login
A355687
Sum of A276150 and its Dirichlet inverse.
2
2, 0, 0, 1, 0, 4, 0, 3, 4, 6, 0, 4, 0, 4, 12, 3, 0, -2, 0, 9, 8, 8, 0, -3, 9, 6, 4, 8, 0, -10, 0, 5, 16, 10, 12, 6, 0, 8, 12, -1, 0, 2, 0, 14, -2, 12, 0, 12, 4, 1, 20, 13, 0, 14, 24, 7, 16, 14, 0, -14, 0, 4, 8, 3, 18, -14, 0, 11, 24, 2, 0, 20, 0, 6, -10, 10, 16, -2, 0, 9, 13, 10, 0, 1, 30, 8, 28, -3, 0, 28, 12, 16
OFFSET
1,1
FORMULA
a(n) = A276150(n) + A355686(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1<d<n} A276150(d) * A355686(n/d).
PROG
(PARI)
A276150(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += d; n = (n-d)/p; p = nextprime(1+p)); (s); };
memoA355686 = Map();
A355686(n) = if(1==n, 1, my(v); if(mapisdefined(memoA355686, n, &v), v, v = -sumdiv(n, d, if(d<n, A276150(n/d)*A355686(d), 0)); mapput(memoA355686, n, v); (v)));
A355687(n) = (A276150(n)+A355686(n));
CROSSREFS
Sequence in context: A347083 A209915 A349386 * A349349 A349443 A319340
KEYWORD
sign,base
AUTHOR
Antti Karttunen, Jul 14 2022
STATUS
approved