login
A365800
Dirichlet inverse of the characteristic function of triangular numbers (A010054).
3
1, 0, -1, 0, 0, -1, 0, 0, 1, -1, 0, 0, 0, 0, -1, 0, 0, 2, 0, 0, -1, 0, 0, 0, 0, 0, -1, -1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -3, -1, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1
OFFSET
1,18
LINKS
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A010054(n/d) * a(d).
PROG
(PARI)
A010054(n) = issquare(8*n + 1);
memoA365800 = Map();
A365800(n) = if(1==n, 1, my(v); if(mapisdefined(memoA365800, n, &v), v, v = -sumdiv(n, d, if(d<n, A010054(n/d)*A365800(d), 0)); mapput(memoA365800, n, v); (v)));
CROSSREFS
Cf. A000217, A010054, A365799 (parity of terms).
Absolute values differ from A308264.
Sequence in context: A309162 A345197 A092575 * A308264 A065335 A230264
KEYWORD
sign
AUTHOR
Antti Karttunen, Oct 05 2023
STATUS
approved