A163407 Sum of semiprime divisors of n with repetition.
0, 0, 0, 4, 0, 6, 0, 12, 9, 10, 0, 16, 0, 14, 15, 24, 0, 21, 0, 24, 21, 22, 0, 30, 25, 26, 27, 32, 0, 31, 0, 40, 33, 34, 35, 37, 0, 38, 39, 42, 0, 41, 0, 48, 39, 46, 0, 48, 49, 45, 51, 56, 0, 45, 55, 54, 57, 58, 0, 51, 0, 62, 51, 60, 65, 61, 0, 72, 69, 59, 0, 57, 0, 74, 55, 80, 77, 71, 0
Offset: 1
Keywords
Examples
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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Programs
-
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
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.
Comments