OFFSET
1,2
LINKS
FORMULA
EXAMPLE
a(12) = 14 because 12 = 2^2*3 and prime(2)^2 + prime(3) = 3^2 + 5 = 14.
MAPLE
f:= proc(n) local t;
add(ithprime(t[1])^t[2], t=ifactors(n)[2])
end proc:
map(f, [$1..100]); # Robert Israel, Apr 25 2024
MATHEMATICA
a[n_] := Plus @@ (Prime[#[[1]]]^#[[2]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 70}]
PROG
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, prime(f[k, 1])^f[k, 2]); \\ Michel Marcus, May 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 09 2018
STATUS
approved