OFFSET
1,2
COMMENTS
16 and 27 are fixed points, ... and see Rivera link. - Michel Marcus, Sep 19 2020
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Carlos Rivera, Puzzle 625. Sum of squares of prime divisors, The Prime Puzzles and Problems Connection.
Carlos Rivera, Puzzle 1019. Follow-up to Puzzle 625, The Prime Puzzles and Problems Connection.
FORMULA
a(x*y) = a(x) + a(y); a(p^k) = k*p^2 for p prime.
Totally additive with a(p) = p^2.
EXAMPLE
a(2) = 2^2 = 4;
a(45) = a(3*3*5) = 3^2 + 3^2 + 5^2 = 43.
MAPLE
A067666 := proc(n)
add(op(2, pe)*op(1, pe)^2, pe=ifactors(n)[2]) ;
end proc:
seq(A067666(n), n=1..100) ; # R. J. Mathar, Jul 31 2024
MATHEMATICA
Join[{0}, Table[Total[Flatten[Table[#[[1]], {#[[2]]}]&/@ FactorInteger[ n]]^2], {n, 2, 60}]] (* Harvey P. Dale, Dec 24 2012 *)
Join[{0}, Table[Total[#[[1]]^2*#[[2]] & /@ FactorInteger[n]], {n, 2, 60}]] (* Zak Seidov, Apr 18 2013 *)
PROG
(PARI) a(n)=local(fm, t); fm=factor(n); t=0; for(k=1, matsize(fm)[1], t+=fm[k, 1]^2*fm[k, 2]); t \\ Franklin T. Adams-Watters, May 03 2009
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, f[k, 1]^2*f[k, 2]); \\ Michel Marcus, Sep 19 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Feb 04 2002
EXTENSIONS
Values through a(59) verified by Franklin T. Adams-Watters, May 03 2009
STATUS
approved