OFFSET
1,2
COMMENTS
By definition, this sequence is completely additive. - Peter Munn, Aug 14 2022
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
18 = 2*3*3 so a(18) = 2*3/2 + 3*4/2 + 3*4/2 = 15.
MAPLE
f:= proc(n) local t; add(t[1]*(t[1]+1)/2*t[2], t = ifactors(n)[2]) end proc:
map(f, [$1..100]);
MATHEMATICA
Prepend[Array[Total@ PolygonalNumber@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[#]] &, 68, 2], 0] (* Michael De Vlieger, Feb 22 2021 *)
PROG
(Python3)
from sympy import factorint
def A341885(n): return sum(k*m*(m+1)//2 for m, k in factorint(n).items()) # Chai Wah Wu, Feb 25 2021
(PARI) a(n) = my(f=factor(n), p); sum(k=1, #f~, p=f[k, 1]; f[k, 2]*p*(p+1)/2); \\ Michel Marcus, Aug 14 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. M. Bergot and Robert Israel, Feb 22 2021
STATUS
approved