login
A340507
a(n) = floor(sqrt(2*n)) - A003056(n).
1
0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0
OFFSET
0
COMMENTS
This is A172471 - A003056.
Conjecture: This is an unsigned version of A072785.
LINKS
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