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