OFFSET
1,3
LINKS
Eric Weisstein's World of Mathematics, Prime Power.
FORMULA
a(n) = Sum_{d|n, d = p^k, p prime, p > 2, k > 0} d.
a(p^k) = p*(p^k - 1)/(p - 1) for p is a prime > 2.
a(2^k*p) = p for p is a prime > 2.
a(2^k) = 0.
Additive with a(2^e) = 0, and a(p^e) = (p^(e+1)-1)/(p-1) - 1 for an odd prime p. - Amiram Eldar, Jul 24 2024
EXAMPLE
a(15) = 8 because 15 has 4 divisors {1, 3, 5, 15} among which 2 are odd prime powers {3, 5} therefore 3 + 5 = 8.
MATHEMATICA
nmax = 80; Rest[CoefficientList[Series[Sum[Boole[PrimePowerQ[k] && Mod[k, 2] == 1] k x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
Table[Total[Select[Divisors[n], PrimePowerQ[#] && Mod[#, 2] == 1 &]], {n, 80}]
f[p_, e_] := (p^(e + 1) - 1)/(p - 1) - 1; f[2, e_] := 0; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jul 24 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Mar 23 2017
STATUS
approved