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.

A052511 a(n) = prime(n) - 1 - A006218(n).

Original entry on oeis.org

0, -1, -1, -2, 0, -2, 0, -2, -1, 1, 1, 1, 3, 1, 1, 2, 6, 2, 6, 4, 2, 4, 6, 4, 9, 9, 7, 5, 5, 1, 13, 11, 13, 11, 17, 10, 14, 16, 16, 14, 18, 12, 20, 16, 14, 12, 22, 24, 25, 21, 21, 21, 21, 23, 25, 23, 25, 23, 27, 19, 19, 25, 33, 30, 28, 24, 36, 36, 42, 36, 38, 32, 38, 40, 40, 38, 40, 40, 42, 40, 45, 43
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Oct 14 2008

Keywords

Comments

a(n) > 0 for n >= 10.
The old entry with this sequence number was a duplicate of A052509.

Crossrefs

See A088526 for another version.

Programs

  • Python
    from math import isqrt
    from sympy import prime
    def A052511(n): return prime(n)-1+(s:=isqrt(n))**2-(sum(n//k for k in range(1,s+1))<<1)  # Chai Wah Wu, Mar 26 2025