This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A159977 #20 Aug 27 2024 11:42:26 %S A159977 1,1,0,0,0,3,0,2,3,4,0,5,0,2,3,4,0,7,20,14,3,2,0,13,4,10,11,16,0,23,4, %T A159977 4,25,10,14,35,6,24,3,2,6,7,0,20,9,48,0,5,28,18,23,14,14,11,16,10,21, %U A159977 4,62,13,38,12,7,16,12,19,36,28,143,32,58,29,96,100,33,2,30,27,12,62,25,46,0 %N A159977 a(n) = (smallest prime >= Fibonacci(n)) - Fibonacci(n). %H A159977 T. D. Noe, <a href="/A159977/b159977.txt">Table of n, a(n) for n = 1..1000</a> %F A159977 a(n) = (smallest prime >= Fibonacci(n)) - Fibonacci(n). %F A159977 a(n) = 0 <=> n in { A001605 }. - _Alois P. Heinz_, Feb 04 2018 %e A159977 a(1) = a(2) = 1 because Fibonacci(1) = Fibonacci(2) = 1, the smallest prime >= 1 is 2, and 2 - 1 = 1. %e A159977 a(3) = a(4) = a(5) = 0 because Fibonacci(3)=2, Fibonacci(4)=3, and Fibonacci(5)=5 are all prime. %p A159977 a:= n-> (f-> nextprime(f-1)-f)(combinat[fibonacci](n)): %p A159977 seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 04 2018 %t A159977 Table[If[PrimeQ[n],0,NextPrime[n]-n],{n,Fibonacci[Range[90]]}] (* _Harvey P. Dale_, Jul 22 2016 *) %o A159977 (UBASIC) 10 'FiboA 20 A=1:print A; 30 B=1:print B; 40 C=A+B:print C;:T=T+1 41 if C<>prmdiv(C) then print "<";nxtprm(C)-C;">":else print "<";0;">"; 50 D=B+C:print D; 51 if D<>prmdiv(D) then print "<";nxtprm(D)-D;">":else print "<";0;">"; 60 A=C:B=D:if T>22 then stop:else 40 %o A159977 (PARI) F=1;G=0;for(i=1,100,print1(nextprime(F)-F,",");T=F;F+=G;G=T) \\ _Hagen von Eitzen_, Jul 20 2009 %Y A159977 Cf. A000045, A001605, A159978. %K A159977 easy,nonn %O A159977 1,6 %A A159977 _Enoch Haga_, Apr 28 2009 %E A159977 More terms (cf. b-file) from _Hagen von Eitzen_, Jul 20 2009 %E A159977 Edited by _Jon E. Schoenfield_, Feb 04 2018