OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000 (terms 1..5000 from G. C. Greubel)
FORMULA
a(n) = Sum_{i=1..k} (e_i)*A007953(p_i) where prime decomposition of n = (p_1)^(e_1) * (p_2)^(e_2) * ... * (p_k)^(e_k).
EXAMPLE
a(22) = 4 because 22 = 2 * 11 and the digital sum of 2 + the digital sum of 11 = 2 + 2 = 4.
a(121) = 4 because 121 = 11^2 = 11 * 11, summing the digits of the prime factors with multiplicity gives A007953(11) + A007953(11) = 2 + 2 = 4.
a(1000) = 21 because = 2^3 * 5^3 = 2 * 2 * 2 * 5 * 5 * 5 and 2 + 2 + 2 + 5 + 5 + 5 = 21, as opposed to A095402(1000) = 7.
MAPLE
A118503 := proc(n) local a; a := 0 ; for p in ifactors(n)[2] do a := a+ op(2, p)*A007953(op(1, p)) ; end do: a ; end proc: # R. J. Mathar, Sep 14 2011
MATHEMATICA
sdpf[n_]:=Total[Flatten[IntegerDigits/@Flatten[Table[#[[1]], {#[[2]]}]&/@FactorInteger[n]]]]; Join[{0}, Array[sdpf, 100, 2]] (* Harvey P. Dale, Sep 19 2013 *)
PROG
(PARI) A118503(n) = { my(f=factor(n)); sum(i=1, #f~, f[i, 2]*sumdigits(f[i, 1])); }; \\ Antti Karttunen, Jun 08 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, May 06 2006
EXTENSIONS
a(0) removed by Joerg Arndt at the suggestion of Antti Karttunen, Jun 08 2024
STATUS
approved