OFFSET
1,2
LINKS
James C. McMahon, Table of n, a(n) for n = 1..10000
Chai Wah Wu, Algorithms for Complementary Sequences, Integers (2025) Vol. 25, Art. No. A95. See p. 24.
FORMULA
a(n) = n+m if n > m*(3*m+1) and a(n) = n+m-1 otherwise where m = floor(sqrt(n/3)).
MATHEMATICA
lim=72; limt=Ceiling[Sqrt[lim/3]]; Complement[Range[lim], Table[n*(3n+2), {n, 0, limt}] ] (* James C. McMahon, Sep 07 2025 *)
PROG
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Chai Wah Wu, Sep 04 2025
STATUS
approved
