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.

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

This page as a plain text file.
%I A061265 #15 Feb 16 2025 08:32:44
%S A061265 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 A061265 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 A061265 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 A061265 Number of squares between n-th prime and (n+1)st prime.
%C A061265 If n-th prime is a member of A053001 then a(n) is at least 1. If not, then a(n) = 0.
%C A061265 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 A061265 a(A038107(n)) = 1 for n > 1; a(A221056(n)) = 0. - _Reinhard Zumkeller_, Apr 15 2013
%H A061265 Harry J. Smith, <a href="/A061265/b061265.txt">Table of n, a(n) for n = 1..2000</a>
%H A061265 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LegendresConjecture.html">Legendre's Conjecture</a>
%H A061265 Wikipedia, <a href="http://en.wikipedia.org/wiki/Legendre%27s_conjecture">Legendre's conjecture</a>
%F A061265 a(n) = floor(sqrt(prime(n+1))) - floor(sqrt(prime(n))). - _Vladeta Jovovic_, May 01 2003
%e A061265 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 A061265 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 A061265 (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 A061265 (Haskell)
%o A061265 a061265 n = a061265_list !! (n-1)
%o A061265 a061265_list = map sum $
%o A061265    zipWith (\u v -> map a010052 [u..v]) a000040_list $ tail a000040_list
%o A061265 -- _Reinhard Zumkeller_, Apr 15 2013
%Y A061265 Cf. A053001.
%Y A061265 Cf. A038107.
%Y A061265 Cf. A014085.
%K A061265 nonn,base
%O A061265 1,1
%A A061265 _Amarnath Murthy_, Apr 24 2001
%E A061265 Extended by _Patrick De Geest_, Jun 05 2001
%E A061265 Offset changed from 0 to 1 by _Harry J. Smith_, Jul 20 2009