login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A334862
a(n) = A334097(n) - A064415(n).
3
0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 2, 0, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 1, 0, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 3, 1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 1, 3, 2, 2, 2, 1, 1, 3, 0, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 1, 4, 1, 1, 2, 2, 2, 3, 1, 2, 3, 2, 1, 2, 1, 3, 1, 1, 2, 3, 2, 2, 2, 1, 1, 3
OFFSET
1,9
COMMENTS
Completely additive because A064415 and A334097 are.
LINKS
FORMULA
a(2) = 0, a(p) = A334097(p+1)-A064415(p-1) for odd primes p, a(m*n) = a(m)+a(n), if m,n > 1.
a(n) = A334097(n) - A064415(n).
a(3^k) = k for all k>= 0.
PROG
(PARI)
A064415(n) = { my(f=factor(n)); sum(k=1, #f~, if(2==f[k, 1], f[k, 2], f[k, 2]*A064415(f[k, 1]-1))); };
A334097(n) = { my(f=factor(n)); sum(k=1, #f~, if(2==f[k, 1], f[k, 2], f[k, 2]*A334097(f[k, 1]+1))); };
A334862(n) = (A334097(n)-A064415(n));
\\ Or alternatively as:
A334862(n) = { my(f=factor(n)); sum(k=1, #f~, if(2==f[k, 1], 0, f[k, 2]*(A334097(f[k, 1]+1)-A064415(f[k, 1]-1)))); };
CROSSREFS
Cf. A000079 (positions of zeros), A000244, A064415, A334097, A334861.
Sequence in context: A154338 A087436 A340831 * A329801 A053255 A085856
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 14 2020
STATUS
approved