login
A329531
Number of primes between squares of successive even numbers.
1
2, 4, 5, 7, 7, 9, 10, 10, 12, 12, 14, 13, 17, 15, 17, 18, 19, 19, 18, 23, 23, 21, 24, 23, 25, 26, 28, 24, 29, 29, 29, 32, 30, 30, 30, 36, 32, 35, 36, 41, 33, 39, 33, 43, 36, 40, 42, 42, 43, 44, 45, 41, 42, 43, 47, 51, 49, 47, 52, 40, 57, 53, 52, 52, 48
OFFSET
1,1
LINKS
FORMULA
a(n) = A000720(4*n^2) - A000720(4*(n-1)^2). - Robert Israel, Nov 17 2019
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