|
|
A061265
|
|
Number of squares between n-th prime and (n+1)st prime.
|
|
9
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
If n-th prime is a member of A053001 then a(n) is at least 1. If not, then a(n) = 0.
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
|
|
LINKS
|
|
|
FORMULA
|
a(n) = floor(sqrt(prime(n+1))) - floor(sqrt(prime(n))). - Vladeta Jovovic, May 01 2003
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
ns[{a_, b_}]:=Count[Range[a+1, b-1], _?(IntegerQ[Sqrt[#]]&)]; ns/@ Partition[ Prime[Range[110]], 2, 1] (* Harvey P. Dale, Mar 14 2015 *)
|
|
PROG
|
(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
(Haskell)
a061265 n = a061265_list !! (n-1)
a061265_list = map sum $
zipWith (\u v -> map a010052 [u..v]) a000040_list $ tail a000040_list
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|