OFFSET
0
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
PROG
(PARI) a(n) = sqrtint(2*n) - (sqrtint(8*n+1)-1)\2; \\ Michel Marcus, Jan 25 2021
(Python)
from math import isqrt
def A340507(n): return isqrt(m:=n<<1)-(isqrt((m<<2)+1)-1>>1) # Chai Wah Wu, Aug 09 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 25 2021
STATUS
approved