cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226561 a(n) = Sum_{d|n} d^n * phi(d), where phi(n) is the Euler totient function A000010(n).

This page as a plain text file.
%I A226561 #37 Sep 08 2022 08:46:05
%S A226561 1,5,55,529,12501,94835,4941259,67240193,2324562301,40039063525,
%T A226561 2853116706111,35668789979107,3634501279107037,66676110291801575,
%U A226561 3503151245145885315,147575078498173255681,13235844190181388226833,236079349222711695887225,35611553801885644604231623
%N A226561 a(n) = Sum_{d|n} d^n * phi(d), where phi(n) is the Euler totient function A000010(n).
%C A226561 Compare formula to the identity: Sum_{d|n} phi(d) = n.
%H A226561 Robert Israel, <a href="/A226561/b226561.txt">Table of n, a(n) for n = 1..385</a>
%F A226561 Logarithmic derivative of A226560.
%F A226561 a(n) = Sum_{d|n} d * phi(d^n).
%F A226561 a(n) = Sum_{d|n} phi(d^(n+1)).
%F A226561 a(n) = Sum_{d|n} phi(d^(n+2))/d.
%F A226561 a(n) = Sum_{d|n} d^(n-k+1) * phi(d^k) for k >= 1.
%F A226561 G.f.: Sum_{k>=1} phi(k)*(k*x)^k/(1 - (k*x)^k). - _Ilya Gutkovskiy_, Nov 06 2018
%F A226561 a(n) = Sum_{k=1..n} (n/gcd(k,n))^n. - _Seiichi Manyama_, Mar 11 2021
%F A226561 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
%e A226561 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 + ...
%e A226561 where
%e A226561 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 + ...
%p A226561 f:= n -> add(d^n * numtheory:-phi(d), d = numtheory:-divisors(n)):
%p A226561 map(f, [$1..40]); # _Robert Israel_, Jun 16 2017
%t A226561 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 *)
%o A226561 (PARI) {a(n)=sumdiv(n, d, d^n*eulerphi(d))}
%o A226561 for(n=1,30,print1(a(n),", "))
%o A226561 (PARI) a(n) = sum(k=1, n, (n/gcd(k, n))^n); \\ _Seiichi Manyama_, Mar 11 2021
%o A226561 (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
%o A226561 (Python)
%o A226561 from sympy import totient, divisors
%o A226561 def A226561(n):
%o A226561     return sum(totient(d)*d**n for d in divisors(n,generator=True)) # _Chai Wah Wu_, Feb 15 2020
%Y A226561 Cf. A226560, A226459, A000010, A321349, A332517.
%K A226561 nonn
%O A226561 1,2
%A A226561 _Paul D. Hanna_, Jun 10 2013