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.

A329531 Number of primes between squares of successive even numbers.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Nov 15 2019

Keywords

Examples

			a(1) = 2: 2 primes (2, 3) between 0 and 4;
a(2) = 4: 4 primes (5, 7, 11, 13) between 4 and 16.
		

Crossrefs

Programs

  • Magma
    [2] cat [#PrimesInInterval(4*k^2,4*(k+1)^2): k in [1..70]]; // Marius A. Burtea, Nov 17 2019
  • 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
  • PARI
    forstep (k=1,129,2,print1(primepi((k+1)^2)-primepi((k-1)^2),", "))
    

Formula

a(n) = A000720(4*n^2) - A000720(4*(n-1)^2). - Robert Israel, Nov 17 2019