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.

A053683 Number of nonprimes <= prime(n)^2.

Original entry on oeis.org

2, 5, 16, 34, 91, 130, 228, 289, 430, 695, 799, 1150, 1418, 1566, 1880, 2400, 2994, 3202, 3880, 4366, 4624, 5430, 6003, 6921, 8246, 8949, 9315, 10068, 10458, 11246, 14252, 15185, 16628, 17131, 19712, 20254, 21920, 23654, 24846, 26688, 28605
Offset: 1

Views

Author

Labos Elemer, Feb 16 2000

Keywords

Examples

			Up to 25 = prime(3)^2, the 16 nonprimes are 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25.
		

Crossrefs

Cf. A000879.

Programs

  • Mathematica
    a[n_] := Prime[n]^2 - PrimePi[Prime[n]^2]; Array[a, 50] (* Amiram Eldar, Feb 16 2025 *)
  • PARI
    a(n) = prime(n)^2 - primepi(prime(n)^2); \\ Michel Marcus, Oct 28 2013

Formula

a(n) = A000040(n)^2 - A000879(n). - Jean-Christophe Hervé, Oct 27 2013