OFFSET
1,4
COMMENTS
We regard each prime divisor of n as distinct, and count each product of an unordered, distinct pair of them as a semiprime divisor.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
If s is the sum of the prime divisors of n with repetition, and ss is the sum of their squares, a(n) = (s^2 - ss) / 2.
EXAMPLE
For n = 12, the prime divisors with repetition are 2,2,3. Distinguishing the 2s as 2 and 2', we have semiprime divisors 2*2', 2*3, and 2'*3, totaling 4+6+6 = 16.
PROG
(PARI) a(n)=local(fn, p, e, s, ss); fn=factor(n); for(i=1, matsize(fn)[1], p=fn[i, 1]; e=fn[i, 2]; s+=p*e; ss+=p^2*e); (s^2-ss)\2
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Franklin T. Adams-Watters, Jul 26 2009
STATUS
approved