OFFSET
1,2
COMMENTS
a(n) = n iff n is 1 or a prime;
a(n) = n+1 iff n is a biprime, i.e., n = p*q, p <= q primes;
a(n) = n+(p+q+r) iff n is a triprime, i.e., n = p*q*r, p <= q <= r primes;
a(n) = n + (p*q + p*r + p*s + q*r + q*s + r*s) + 1 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