login
A359602
Sum of A244042 and its Dirichlet inverse, where A244042(n) replaces 2's with 0's in the ternary representation of n.
2
2, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 24, 0, 0, 18, 16, 0, 0, 0, 24, 6, 0, 0, 0, 9, 0, 27, 8, 0, 60, 0, 0, 54, 0, 6, 36, 0, 0, 78, 80, 0, 72, 0, 72, 27, 0, 0, 12, 1, 60, 54, 104, 0, 0, 54, 96, 6, 0, 0, -72, 0, 0, 9, 16, 78, 24, 0, 72, 18, 92, 0, 0, 0, 0, -21, 8, 18, 0, 0, -84, 81, 0, 0, 144, 54, 0, 162, 32
OFFSET
1,1
LINKS
FORMULA
a(n) = A244042(n) + A359601(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1<d<n} A244042(d) * A359601(n/d).
PROG
(PARI)
A244042(n) = fromdigits(apply(x->(x%2), digits(n, 3)), 3);
memoA359601 = Map();
A359601(n) = if(1==n, 1, my(v); if(mapisdefined(memoA359601, n, &v), v, v = -sumdiv(n, d, if(d<n, A244042(n/d)*A359601(d), 0)); mapput(memoA359601, n, v); (v)));
A359602(n) = (A244042(n)+A359601(n));
CROSSREFS
Cf. A053850 (positions of odd terms), A353569 (parity of terms).
Sequence in context: A282530 A060478 A088806 * A280618 A347714 A089807
KEYWORD
sign,base,easy
AUTHOR
Antti Karttunen, Jan 11 2023
STATUS
approved