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!)
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])):
map(f, [$0..100]); # Robert Israel, Nov 22 2018
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
Cf. A048199.
Sequence in context: A213512 A218774 A270824 * A096006 A182128 A131294
KEYWORD
easy,nonn
AUTHOR
STATUS
approved

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)