cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A048198 #18 Jul 20 2023 10:32:55
%S A048198 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 A048198 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 A048198 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 A048198 Number of primes between successive n's, where n mod 10 = 5.
%C A048198 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 A048198 Robert Israel, <a href="/A048198/b048198.txt">Table of n, a(n) for n = 0..10000</a>
%F A048198 Starting at 0, count primes between 0-5, 5-15, 15-25, etc.
%e A048198 Between n's 115 and 125 there are no primes, indicated by the entry 0.
%p A048198 f:= n -> nops(select(isprime, [$10*n-4..10*n+4])):
%p A048198 map(f, [$0..100]); # _Robert Israel_, Nov 22 2018
%t A048198 a[n_] := Length[Select[Range[Max[10 n - 4, 1], 10 n + 4], PrimeQ]]; Array[a, 100, 0] (* _Amiram Eldar_, Nov 22 2018 *)
%t A048198 Join[{2},Differences[PrimePi[Range[5,1115,10]]]] (* _Harvey P. Dale_, Jul 20 2023 *)
%o A048198 (PARI) a(n) = my(na = 10*n - 5); my(nb = na + 10); primepi(nb - 1) - primepi(na + 1); \\ _Michel Marcus_, Aug 25 2013
%Y A048198 Cf. A048199.
%K A048198 easy,nonn
%O A048198 0,1
%A A048198 _Enoch Haga_