The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #18 Jul 20 2023 10:32:55

%S 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,

%T 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,

%U 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

%N Number of primes between successive n's, where n mod 10 = 5.

%C 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.

%H Robert Israel, <a href="/A048198/b048198.txt">Table of n, a(n) for n = 0..10000</a>

%F Starting at 0, count primes between 0-5, 5-15, 15-25, etc.

%e Between n's 115 and 125 there are no primes, indicated by the entry 0.

%p f:= n -> nops(select(isprime, [$10*n-4..10*n+4])):

%p map(f, [$0..100]); # _Robert Israel_, Nov 22 2018

%t a[n_] := Length[Select[Range[Max[10 n - 4, 1], 10 n + 4], PrimeQ]]; Array[a, 100, 0] (* _Amiram Eldar_, Nov 22 2018 *)

%t Join[{2},Differences[PrimePi[Range[5,1115,10]]]] (* _Harvey P. Dale_, Jul 20 2023 *)

%o (PARI) a(n) = my(na = 10*n - 5); my(nb = na + 10); primepi(nb - 1) - primepi(na + 1); \\ _Michel Marcus_, Aug 25 2013

%Y Cf. A048199.

%K easy,nonn

%O 0,1

%A _Enoch Haga_

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 May 14 09:42 EDT 2024. Contains 372532 sequences. (Running on oeis4.)