OFFSET
1,2
COMMENTS
If d > 1 divides n, the multiplicity of d in n is the largest integer i such that d^i divides n; e.g. the multiplicity of 4 in 16 is 2. If d = 1 (degenerate case), then the multiplicity of d is defined as 1.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} A286561(n,d)*d. - Antti Karttunen, May 20 2017
EXAMPLE
The divisors of 16 are 1, 2, 4, 8, 16, which are of multiplicity 1, 4, 2, 1, 1, respectively, in 16. So a(16) = 1*1 + 4*2 + 2*4 + 1*8 + 1*16 = 41.
MATHEMATICA
Table[1 + Total[Function[i, i*Select[Range[Log[i, n]], Divisible[n, i^#] &][[-1]]] /@ Rest@Divisors@n], {n, 69}] (* Ivan Neretin, Jul 26 2015 *)
Table[1 + DivisorSum[n, # IntegerExponent[n, #] &, # > 1 &], {n, 69}] (* Michael De Vlieger, May 20 2017 *)
PROG
(PARI)
A286561(n, k) = { my(i=1); if(1==k, 1, while(!(n%(k^i)), i = i+1); (i-1)); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Nov 28 2009
EXTENSIONS
Extended by Ray Chandler, Dec 08 2009
STATUS
approved