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
Daniel Forgues, Table of n, a(n) for n = 1..100000
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