OFFSET
0,6
LINKS
Kevin Ryde, Table of n, a(n) for n = 0..10000
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
EXAMPLE
a(5) = floor((sqrt(24*5+1)+1)/6) = 2.
MATHEMATICA
f[n_] := Floor[(Sqrt[24 n + 1] + 1)/6]; Array[f, 105, 0] (* Robert G. Wilson v, Sep 10 2010 *)
PROG
(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
(PARI) a(n) = (sqrtint(24*n+1)+1)\6; \\ Kevin Ryde, Apr 21 2021
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
William A. Tedeschi, Sep 07 2010
EXTENSIONS
More terms from Robert G. Wilson v, Sep 10 2010
STATUS
approved