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.

A052146 a(n) = floor((sqrt(1+8*n)-3)/2).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 23 2000

Keywords

References

  • Richard P. Stanley, Enumerative Combinatorics, Vol. 2, Cambridge, 1999; see p. 450, Problem 7.2(d).

Crossrefs

Programs

  • Mathematica
    Floor[(Sqrt[1 + 8 Range[100]] - 3)/2] (* Wesley Ivan Hurt, Oct 02 2021 *)
  • PARI
    a(n) = (sqrtint(1 + 8*n)-3)\2; \\ Amiram Eldar, Jun 27 2025

Formula

From Amiram Eldar, Jun 27 2025: (Start)
a(n) = A003056(n) - 1.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi/4 (A003881). (End)