|
Search: id:A104477
|
|
|
| A104477 |
|
Number of successive square-free intervals between primes. |
|
+0 2
|
|
| 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 2, 0, 3, 0, 2, 0, 4, 0, 3, 0, 4, 0, 4, 0, 3, 0, 5, 0, 6, 0, 4, 0, 5, 0, 5, 0, 6, 0, 6, 0, 6, 0, 5, 0, 8, 0, 7, 0, 6, 0, 7, 0, 8, 0, 7, 0, 7, 0, 9, 0, 8, 0, 9, 0, 8, 0, 9, 0, 8, 0, 8, 0, 11, 0, 10, 0, 11, 0, 10, 0, 8, 0, 11, 0, 10, 0, 12, 0, 9, 0, 12, 0, 14, 0, 9, 0, 10, 0
(list; graph; listen)
|
|
|
OFFSET
|
0,7
|
|
|
FORMULA
|
a(2n) = 0: this is the interval from the greatest prime less than the (n+1)th square, through that square and up to the least prime greater than that square. - Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 23 2005
a(2n-1) = the difference between the indices of the greatest prime less than (n+1)^2 and the least prime greater than n^2. - Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 23 2005
|
|
EXAMPLE
|
a(1)=1 because the first interval between primes (2 to 3) is free of squares.
a(2)=0 because there is a square between 3 and 5.
a(7)=2 because there are two successive square-free intervals: 17 to 19; and 19 to 23.
a(8)=0 because between 23 and 29 there is a square: 25.
|
|
MATHEMATICA
|
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; f[n_] := If[ EvenQ[n], 0, PrimePi[ PrevPrim[(n + 3)^2/4]] - PrimePi[ NextPrim[(n + 1)^2/4]]]; Table[ f[n], {n, 100}] (from Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 23 2005)
|
|
CROSSREFS
|
Cf. A061265, A031265, A104481.
Sequence in context: A112554 A120616 A108044 this_sequence A052173 A124305 A087073
Adjacent sequences: A104474 A104475 A104476 this_sequence A104478 A104479 A104480
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Alexandre Wajnberg (alexandre.wajnberg(AT)ulb.ac.be), Apr 18 2005
|
|
EXTENSIONS
|
More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 23 2005
|
|
|
Search completed in 0.002 seconds
|