OFFSET
1,1
FORMULA
a(n) = n + floor(1/2+(n/3)^(1/2)).
EXAMPLE
Octagonal numbers: (1,8,21,40,65,...), so that we get (2,3,4,5,6,7,9,10,...,20,22,...,39,41...).
MATHEMATICA
Table[n+Floor[1/2+(n/3)^(1/2)], {n, 100}]
PROG
(Python)
from math import isqrt
def A183220(n): return n+(isqrt((n<<2)//3)+1>>1) # Chai Wah Wu, Oct 05 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 01 2011
STATUS
approved