OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..2500
FORMULA
EXAMPLE
a(1) = 2: 2 primes (2, 3) between 0 and 4;
a(2) = 4: 4 primes (5, 7, 11, 13) between 4 and 16.
MAPLE
2, seq(nops(select(isprime, [seq(j, j=(i-2)^2+1..i^2, 2)])), i=4..1000, 2); # Robert Israel, Nov 17 2019
PROG
(PARI) forstep (k=1, 129, 2, print1(primepi((k+1)^2)-primepi((k-1)^2), ", "))
(Magma) [2] cat [#PrimesInInterval(4*k^2, 4*(k+1)^2): k in [1..70]]; // Marius A. Burtea, Nov 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Nov 15 2019
STATUS
approved