OFFSET
1,2
COMMENTS
Compare formula to the identity: Sum_{d|n} phi(d) = n.
LINKS
Robert Israel, Table of n, a(n) for n = 1..385
FORMULA
Logarithmic derivative of A226560.
a(n) = Sum_{d|n} d * phi(d^n).
a(n) = Sum_{d|n} phi(d^(n+1)).
a(n) = Sum_{d|n} phi(d^(n+2))/d.
a(n) = Sum_{d|n} d^(n-k+1) * phi(d^k) for k >= 1.
G.f.: Sum_{k>=1} phi(k)*(k*x)^k/(1 - (k*x)^k). - Ilya Gutkovskiy, Nov 06 2018
a(n) = Sum_{k=1..n} (n/gcd(k,n))^n. - Seiichi Manyama, Mar 11 2021
a(n) = Sum_{k=1..n} gcd(n,k)^n*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 10 2021
EXAMPLE
L.g.f.: L(x) = x + 5*x^2/2 + 55*x^3/3 + 529*x^4/4 + 12501*x^5/5 + 94835*x^6/6 + ...
where
exp(L(x)) = 1 + x + 3*x^2 + 21*x^3 + 155*x^4 + 2691*x^5 + 18924*x^6 + 732230*x^7 + 9223166*x^8 + ... + A226560(n)*x^n + ...
MAPLE
f:= n -> add(d^n * numtheory:-phi(d), d = numtheory:-divisors(n)):
map(f, [$1..40]); # Robert Israel, Jun 16 2017
MATHEMATICA
Table[DivisorSum[n, #*EulerPhi[#^n] &], {n, 1, 30}] (* or *) With[{nmax = 30}, Rest[CoefficientList[Series[Sum[EulerPhi[k]*(k*x)^k/(1 - (k*x)^k), {k, 1, 2*nmax}], {x, 0, nmax}], x]]] (* G. C. Greubel, Nov 07 2018 *)
PROG
(PARI) {a(n)=sumdiv(n, d, d^n*eulerphi(d))}
for(n=1, 30, print1(a(n), ", "))
(PARI) a(n) = sum(k=1, n, (n/gcd(k, n))^n); \\ Seiichi Manyama, Mar 11 2021
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[EulerPhi(k)*(k*x)^k/(1-(k*x)^k): k in [1..2*m]]) )); // G. C. Greubel, Nov 07 2018
(Python)
from sympy import totient, divisors
def A226561(n):
return sum(totient(d)*d**n for d in divisors(n, generator=True)) # Chai Wah Wu, Feb 15 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jun 10 2013
STATUS
approved