OFFSET
1,2
FORMULA
(See the Mathematica code.)
From Chai Wah Wu, Nov 05 2025: (Start)
a(n) = n+m-4 if 2*n <= (m-3)*(m+4) and a(n) = n+m-3 otherwise, where m = floor(sqrt(8*n+49)/2).
In general, the complement of the sequence b(n) = n*(n+2*k+1)/2 is given by: a(n) = n+m-k if n <= (m-k+1)*(m+k)/2 and a(n) = n+m-k+1 otherwise, where m = floor(sqrt(8*n+(2k-1)^2)/2). (End)
MATHEMATICA
a=1/2; b=9/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
(Python)
from math import isqrt
def A183293(n): return n-4+(m:=isqrt((n<<3)+49)>>1)+((n<<1)>(m-3)*(m+4)) # Chai Wah Wu, Nov 05 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 03 2011
STATUS
approved
