OFFSET
1,3
LINKS
FORMULA
a(n) = [x^n] Sum_{k>=1} n^(k - 1) * x^prime(k) / (1 - x^prime(k)).
EXAMPLE
a(21) = a(3 * 7) = a(prime(2) * prime(4)) = 21^1 + 21^3 = 9282;
9282 in base 21 (reverse order of digits with leading zero) = 0101.
| |
2 4
MAPLE
a:= n-> add(n^(numtheory[pi](i[1])-1), i=ifactors(n)[2]):
seq(a(n), n=1..42); # Alois P. Heinz, Feb 11 2020
MATHEMATICA
a[n_] := Plus @@ (n^(PrimePi[#[[1]]] - 1) & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 1, 40}]
Table[SeriesCoefficient[Sum[n^(k - 1) x^Prime[k]/(1 - x^Prime[k]), {k, 1, n}], {x, 0, n}], {n, 1, 40}]
PROG
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, n^(primepi(f[k, 1])-1)); \\ Michel Marcus, Feb 11 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 11 2020
STATUS
approved