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.

A180447 n appears 3n+1 times.

Original entry on oeis.org

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

Views

Author

William A. Tedeschi, Sep 07 2010

Keywords

Examples

			a(5) = floor((sqrt(24*5+1)+1)/6) = 2.
		

Crossrefs

Cf. A000326 (indices of run starts), A016655, A180446.

Programs

  • Mathematica
    f[n_] := Floor[(Sqrt[24 n + 1] + 1)/6]; Array[f, 105, 0] (* Robert G. Wilson v, Sep 10 2010 *)
  • PARI
    a(n) = (sqrtint(24*n+1)+1)\6; \\ Kevin Ryde, Apr 21 2021
  • Python
    l = [floor((sqrt(24*n+1)+1)/6) for n in range(0,101)]
    
  • Python
    from math import isqrt
    def A180447(n): return (m:=isqrt((k:=n<<1)//3))+(k>m*(3*m+5)) # Chai Wah Wu, Nov 04 2024
    

Formula

a(n) = floor((sqrt(24n+1)+1)/6).
a(n) = m+1 if 2n>m*(3m+5) and a(n) = m otherwise where m = floor(sqrt(2n/3)). For n>0, a(n) = k+1 if 2n>=(k+1)(3k+2) and a(n) = k otherwise where k = floor(sqrt(2(n-1)/3)). - Chai Wah Wu, Nov 04 2024
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2 (= A016655 / 10). - Amiram Eldar, Jun 30 2025

Extensions

More terms from Robert G. Wilson v, Sep 10 2010