OFFSET
1,4
COMMENTS
a(1) = 0 (empty sum). - Antti Karttunen, May 28 2017
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 1 iff n is prime, a(n) = 2 iff n is a nonsquare semiprime (A006881). - Robert G. Wilson v, Dec 27 2005
EXAMPLE
45 = 3^2 * 5^1. So a(45) = 2^2 + 1^1 = 5.
MATHEMATICA
f[n_] := Block[{fi = Last@Transpose@FactorInteger@n}, Plus @@ (fi^fi)]; Rest@Array[f, 92] (* Robert G. Wilson v *)
PROG
(PARI) A112621(n) = { my(f = factor(n), s = 0); for (k=1, #f~, s += (f[k, 2]^f[k, 2]); ); s; } \\ Antti Karttunen, May 28 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 25 2005
EXTENSIONS
More terms from Robert G. Wilson v, Dec 27 2005
Term a(1) = 0 prepended, data section extended to 105 terms - Antti Karttunen, May 28 2017
STATUS
approved