|
|
A048198
|
|
Number of primes between successive n's, where n mod 10 = 5.
|
|
4
|
|
|
2, 3, 3, 2, 3, 2, 2, 3, 2, 1, 3, 3, 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 3, 2, 1, 2, 2, 3, 1, 0, 3, 1, 1, 1, 3, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 1, 2, 2, 1, 2, 0, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 0, 1, 1, 2, 2, 2, 1, 1, 3, 0, 3, 1, 0, 2, 1, 1, 2, 2, 0, 2, 2, 1, 1, 2, 2, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
A way to visualize the distribution of primes without the clutter of the numbers themselves. Consecutive 0's indicate stretches where there are no primes. Other patterns become obvious, as a string of 2's or 1's.
|
|
LINKS
|
|
|
FORMULA
|
Starting at 0, count primes between 0-5, 5-15, 15-25, etc.
|
|
EXAMPLE
|
Between n's 115 and 125 there are no primes, indicated by the entry 0.
|
|
MAPLE
|
f:= n -> nops(select(isprime, [$10*n-4..10*n+4])):
|
|
MATHEMATICA
|
a[n_] := Length[Select[Range[Max[10 n - 4, 1], 10 n + 4], PrimeQ]]; Array[a, 100, 0] (* Amiram Eldar, Nov 22 2018 *)
Join[{2}, Differences[PrimePi[Range[5, 1115, 10]]]] (* Harvey P. Dale, Jul 20 2023 *)
|
|
PROG
|
(PARI) a(n) = my(na = 10*n - 5); my(nb = na + 10); primepi(nb - 1) - primepi(na + 1); \\ Michel Marcus, Aug 25 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|