OFFSET
1,2
FORMULA
(See the Mathematica code.)
a(n) = n + A180447(n-1). - Kevin Ryde, Sep 01 2024
a(n) = n+m+1 if 2n>=m(3m+5)+4 and a(n) = n+m otherwise where m = floor(sqrt(2n/3)). - Chai Wah Wu, Nov 04 2024
MATHEMATICA
a=3/2; b=1/2;
F[n_]:=a*n^2+b*n;
R[n_]:=(n/a+((b-1)/(2a))^2)^(1/2);
G[n_]:=n-1+Ceiling[R[n]-(b-1)/(2a)];
Table[F[n], {n, 60}]
Table[G[n], {n, 100}]
PROG
(PARI) a(n) = n + (sqrtint(24*n)+1)\6; \\ Kevin Ryde, Sep 01 2024
(Python)
from math import isqrt
def A183294(n): return n+(m:=isqrt((k:=n<<1)//3))+(k>=m*(3*m+5)+4) # Chai Wah Wu, Nov 04 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 03 2011
STATUS
approved