cp's OEIS Frontend

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.

A052011 Number of primes between successive Fibonacci numbers exclusive.

This page as a plain text file.
%I A052011 #47 Jan 12 2025 15:35:01
%S A052011 0,0,0,0,1,1,2,3,5,7,10,16,23,37,55,84,125,198,297,458,704,1087,1673,
%T A052011 2602,4029,6263,9738,15186,23704,36981,57909,90550,142033,222855,
%U A052011 349862,549903,865019,1361581,2145191,3381318,5334509,8419527,13298630
%N A052011 Number of primes between successive Fibonacci numbers exclusive.
%C A052011 With the given sequence data, we see that neither endpoint is included, so we count primes p in the open interval F(n)<p<F(n+1) only. - _Jeppe Stig Nielsen_, Jun 06 2015
%H A052011 Amiram Eldar, <a href="/A052011/b052011.txt">Table of n, a(n) for n = 1..122</a> (calculated from the data at A054782 and A001605)
%F A052011 a(n) = pi(F(n+1)-1) - pi(F(n)) = A000720(A000045(n+1)-1) - A000720(A000045(n)). - _Jonathan Vos Post_, Mar 08 2010; corrected by _Jeppe Stig Nielsen_, Jun 06 2015
%F A052011 a(n) ~ phi^(n-1)/(n*sqrt(5)*log(phi)), where phi = (1+sqrt(5))/2 is the golden ratio. - _Charles R Greathouse IV_, Jun 08 2015
%F A052011 a(n) = A054782(n+1) - A054782(n) - [n+1 in A001605], where [] denotes the Iverson bracket. - _Amiram Eldar_, Jun 10 2024
%e A052011 Between Fib(9)=34 and Fib(10)=55 we find the following primes: 37, 41, 43, 47 and 53 hence a(9)=5.
%p A052011 for n from 1 to 43 do T[n]:= numtheory:-pi(combinat:-fibonacci(n)) od:
%p A052011 seq(T[n]-T[n-1]-`if`(isprime(combinat:-fibonacci(n)),1,0), n=2..43); # _Robert Israel_, Jun 08 2015
%t A052011 lst={};Do[p=0;Do[If[PrimeQ[a],p++ ],{a,Fibonacci[n]+1,Fibonacci[n+1]-1}];AppendTo[lst,p],{n,50}];lst (* _Vladimir Joseph Stephan Orlovsky_, Nov 23 2009 *)
%t A052011 pbf[n_]:=Module[{fib1=If[PrimeQ[Fibonacci[n+1]],PrimePi[Fibonacci[n+1]-1], PrimePi[ Fibonacci[n+1]]], fib0=If[PrimeQ[Fibonacci[n]], PrimePi[ Fibonacci[n]+1],PrimePi[Fibonacci[n]]]},Max[0,fib1-fib0]]; Array[pbf,50] (* _Harvey P. Dale_, Mar 01 2012 *)
%o A052011 (Haskell)
%o A052011 a052011 n = a052011_list !! (n-1)
%o A052011 a052011_list = c 0 0 $ drop 2 a000045_list where
%o A052011   c x y fs'@(f:fs) | x < f     = c (x+1) (y + a010051 x) fs'
%o A052011                    | otherwise = y : c (x+1) 0 fs
%o A052011 -- _Reinhard Zumkeller_, Dec 18 2011
%o A052011 (PARI) a(n)=my(s); forprime(p=fibonacci(n)+1,fibonacci(n+1)-1,s++); s \\ _Charles R Greathouse IV_, Jun 08 2015
%Y A052011 Cf. A000040, A001605, A005478 (endpoint primes), A010051, A052012, A054782.
%K A052011 nonn,nice
%O A052011 1,7
%A A052011 _Patrick De Geest_, Nov 15 1999