login
A168066
If n = Product p(k)^e(k) then a(n) = (Product (p(k)+1)^e(k) - Product (p(k)-1)^e(k))/2, a(1) = 0.
7
0, 1, 1, 4, 1, 5, 1, 13, 6, 7, 1, 17, 1, 9, 8, 40, 1, 22, 1, 25, 10, 13, 1, 53, 10, 15, 28, 33, 1, 32, 1, 121, 14, 19, 12, 70, 1, 21, 16, 79, 1, 42, 1, 49, 40, 25, 1, 161, 14, 46, 20, 57, 1, 92, 16, 105, 22, 31, 1, 104, 1, 33, 52, 364, 18, 62, 1, 73, 26, 60, 1, 214, 1, 39, 56, 81, 18, 72
OFFSET
1,4
COMMENTS
a(n) = 0 iff n is 1;
a(n) = 1 iff n is a prime;
a(n) = p+q iff n is a biprime, i.e., n = p*q, p <= q primes;
a(n) = (p*q + p*r + q*r)+1 iff n is a triprime, i.e., n = p*q*r, p <= q <= r primes;
a(n) = (p*q*r + p*q*s + p*r*s + q*r*s) + (p+q+r+s) iff n is a quadprime, i.e., n = p*q*r*s, p <= q <= r <= s primes;
...
LINKS
FORMULA
a(n) = (A003959(n) - A003958(n))/2.
PROG
(PARI) a(n) = {f = factor(n); return ((prod(k=1, #f~, (f[k, 1]+1)^f[k, 2]) - prod(k=1, #f~, (f[k, 1]-1)^f[k, 2]))/2); } \\ Michel Marcus, Jun 13 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Forgues, Nov 18 2009
STATUS
approved