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.
%I A226459 #40 Feb 23 2025 01:28:58 %S A226459 1,3,19,131,2501,15573,705895,8388739,258280345,4000002503, %T A226459 259374246011,2972033498453,279577021469773,4762288640230761, %U A226459 233543408203127519,9223372036863164547,778579070010669895697,13115469358432437487707,1874292305362402347591139 %N A226459 a(n) = Sum_{d|n} phi(d^d), where phi(n) is the Euler totient function A000010(n). %C A226459 Compare formula to the identity: Sum_{d|n} phi(d) = n. %H A226459 G. C. Greubel, <a href="/A226459/b226459.txt">Table of n, a(n) for n = 1..385</a> %F A226459 a(n) = Sum_{d|n} d^(d-1) * phi(d). %F A226459 Equals the logarithmic derivative of A226458. %F A226459 G.f.: Sum_{k>=1} phi(k^k)*x^k/(1 - x^k). - _Ilya Gutkovskiy_, Nov 06 2018 %F A226459 a(n) = Sum_{k=1..n} (n/gcd(k,n))^(n/gcd(k,n)-1). - _Seiichi Manyama_, Mar 11 2021 %F A226459 From _Richard L. Ollerton_, May 08 2021: (Start) %F A226459 a(n) = Sum_{k=1..n} phi(gcd(n,k)^gcd(n,k))/phi(n/gcd(n,k)). %F A226459 a(n) = Sum_{k=1..n} phi((n/gcd(n,k))^(n/gcd(n,k)))/phi(n/gcd(n,k)). %F A226459 a(n) = Sum_{k=1..n} gcd(n,k)^(gcd(n,k)-1)*phi(gcd(n,k))/phi(n/gcd(n,k)). (End) %e A226459 L.g.f.: L(x) = x + 3*x^2/2 + 19*x^3/3 + 131*x^4/4 + 2501*x^5/5 + ... %e A226459 where %e A226459 exp(L(x)) = 1 + x + 2*x^2 + 8*x^3 + 41*x^4 + 547*x^5 + 3193*x^6 + ... + A226458(n)*x^n + ... %t A226459 ttf[n_]:=Module[{d=Divisors[n]},Total[EulerPhi[d^d]]]; Array[ttf,20] (* _Harvey P. Dale_, Aug 21 2013 *) %t A226459 With[{nmax = 30}, Rest[CoefficientList[Series[Sum[EulerPhi[k^k]*x^k/(1 - x^k), {k, 1, 2*nmax}], {x, 0, nmax}], x]]] (* _G. C. Greubel_, Nov 07 2018 *) %o A226459 (PARI) {a(n)=sumdiv(n,d, eulerphi(d^d))} %o A226459 for(n=1,30,print1(a(n),", ")) %o A226459 (PARI) a(n) = sum(k=1, n, (n/gcd(k, n))^(n/gcd(k, n)-1)); \\ _Seiichi Manyama_, Mar 11 2021 %o A226459 (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[EulerPhi(k^k)*x^k/(1-x^k): k in [1..3*m]]) )); // _G. C. Greubel_, Nov 07 2018 %o A226459 (Python) %o A226459 from sympy import totient, divisors %o A226459 def A226459(n): %o A226459 return sum(totient(d)*d**(d-1) for d in divisors(n,generator=True)) # _Chai Wah Wu_, Feb 15 2020 %Y A226459 Cf. A226458, A226561, A000010. %K A226459 nonn %O A226459 1,2 %A A226459 _Paul D. Hanna_, Jun 08 2013