login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061265 Number of squares between n-th prime and (n+1)st prime. 9

%I #14 Jul 02 2018 01:42:51

%S 0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,1,

%T 0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,

%U 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1

%N Number of squares between n-th prime and (n+1)st prime.

%C If n-th prime is a member of A053001 then a(n) is at least 1. If not, then a(n) = 0.

%C Legendre's conjecture (still open) that there is always a prime between n^2 and (n+1)^2 is equivalent to conjecturing that a(n) <= 1 for all n. - _Vladeta Jovovic_, May 01 2003

%C a(A038107(n)) = 1 for n > 1; a(A221056(n)) = 0. - _Reinhard Zumkeller_, Apr 15 2013

%H Harry J. Smith, <a href="/A061265/b061265.txt">Table of n, a(n) for n = 1..2000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LegendresConjecture.html">Legendre's Conjecture</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Legendre%27s_conjecture">Legendre's conjecture</a>

%F a(n) = floor(sqrt(prime(n+1))) - floor(sqrt(prime(n))). - _Vladeta Jovovic_, May 01 2003

%e a(3) = 0 as there is no square between 5, the third prime and 7, the fourth prime. a(4) = 1, as there is a square (9) between the 4th prime 7 and the 5th prime 11.

%t ns[{a_,b_}]:=Count[Range[a+1,b-1],_?(IntegerQ[Sqrt[#]]&)]; ns/@ Partition[ Prime[Range[110]],2,1] (* _Harvey P. Dale_, Mar 14 2015 *)

%o (PARI) { n=0; q=2; forprime (p=3, prime(2001), write("b061265.txt", n++, " ", floor(sqrt(p))-floor(sqrt(q))); q=p ) } \\ _Harry J. Smith_, Jul 20 2009

%o (Haskell)

%o a061265 n = a061265_list !! (n-1)

%o a061265_list = map sum $

%o zipWith (\u v -> map a010052 [u..v]) a000040_list $ tail a000040_list

%o -- _Reinhard Zumkeller_, Apr 15 2013

%Y Cf. A053001.

%Y Cf. A038107.

%Y Cf. A014085.

%K nonn,base

%O 1,1

%A _Amarnath Murthy_, Apr 24 2001

%E Extended by _Patrick De Geest_, Jun 05 2001

%E Offset changed from 0 to 1 by _Harry J. Smith_, Jul 20 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:37 EDT 2024. Contains 371906 sequences. (Running on oeis4.)