login
A334864
a(n) = A064097(A003961(n)) - A064097(n).
2
0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 0, 3, 0, 2, 2, 4, 1, 3, 1, 3, 2, 1, 0, 4, 2, 1, 3, 3, 0, 3, 0, 5, 1, 2, 2, 4, 0, 2, 1, 4, 1, 3, 1, 2, 3, 1, -1, 5, 2, 3, 2, 2, 1, 4, 1, 4, 2, 1, -1, 4, 1, 1, 3, 6, 1, 2, 0, 3, 1, 3, -1, 5, 1, 1, 3, 3, 1, 2, 0, 5, 4, 2, 0, 4, 2, 2, 1, 3, -1, 4, 1, 2, 1, 0, 2, 6, 1, 3, 2, 4, 0, 3, 1, 3, 3
OFFSET
1,4
COMMENTS
Completely additive because A064097 and A334863 are.
LINKS
FORMULA
a(n) = A334863(n) - A064097(n) = A064097(A003961(n)) - A064097(n).
a(1) = 0; and for n > 1, a(prime(k)) = A064097(prime(1+k)) - A064097(prime(k)) for k-th prime, and a(n*m) = a(n) + a(m) if m,n > 1.
PROG
(PARI)
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f);
A064097(n) = if(1==n, 0, 1+A064097(n-(n/vecmin(factor(n)[, 1]))));
\\ Or alternatively as:
A334864(n) = { my(f=factor(n)); sum(k=1, #f~, f[k, 2]*(A064097(prime(1+primepi(f[k, 1])))-A064097(f[k, 1]))); };
CROSSREFS
KEYWORD
sign,less
AUTHOR
Antti Karttunen, May 19 2020
STATUS
approved