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.

A082926 Difference between the number of primes equal to or less than n and (1 + the number of nonsquarefree numbers equal to or less than n).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 1, 2, 3, 3, 2, 3, 4, 5, 5, 6, 5, 6, 6, 7, 7, 7, 6, 7, 6, 6, 7, 8, 8, 8, 7, 8, 8, 8, 7, 8, 7, 7, 8, 9, 9, 9, 8, 9, 10, 10, 9, 10, 10, 10, 10, 11, 10, 11, 11, 12, 12, 12, 12, 13, 12
Offset: 1

Views

Author

Anonymous, Apr 15 2003

Keywords

Crossrefs

Programs

  • Mathematica
    nsfQ[n_] := n == 1 || ! SquareFreeQ[n]; Abs[Accumulate[Table[If[nsfQ[n], 1, 0] - If[PrimeQ[n], 1, 0], {n, 1, 100}]]] (* Amiram Eldar, Jun 13 2022 *)
  • PARI
    a(n) = abs(sum(k=1, n, !issquarefree(k)) + 1 - primepi(n)); \\ Michel Marcus, Mar 27 2020

Formula

a(n) = abs(A057627(n) + 1 - A000720(n)). - Michel Marcus, Mar 27 2020

Extensions

Name edited by Michel Marcus, Jun 14 2022