Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #33 Jun 19 2022 15:23:21
%S 1,5,28,261,3126,46688,823544,16777477,387420517,10000003130,
%T 285311670612,8916100495200,302875106592254,11112006826381564,
%U 437893890380862528,18446744073726329093,827240261886336764178,39346408075296925042601,1978419655660313589123980
%N Inverse Moebius transform of f(n) = n^n (A000312).
%H Seiichi Manyama, <a href="/A062796/b062796.txt">Table of n, a(n) for n = 1..386</a> (first 200 terms from Nick Hobson)
%F a(n) = Sum_{d|n} d^d.
%F G.f.: Sum_{n>=1} n^n * x^n/(1 - x^n). - _Paul D. Hanna_, Oct 27 2009
%F Logarithmic derivative of A023879. - _Paul D. Hanna_, Sep 05 2012
%e n=6: divisors = {1,2,3,6}; 1^1 + 2^2 + 3^3 + 6^6 = 1 + 4 + 27 + 46656 = 46688 = a(6).
%t a[n_] := DivisorSum[n, #^# &]; Array[a, 19] (* _Jean-François Alcover_, Dec 23 2015 *)
%o (PARI) vector(17, n, sumdiv(n, d, d^d))
%o (PARI) {a(n)=polcoeff(sum(m=1,n,m^m*x^m/(1-x^m +x*O(x^n))),n)} \\ _Paul D. Hanna_, Oct 27 2009
%o (PARI) a(n) = sumdiv(n,d, d^d ); \\ _Joerg Arndt_, Apr 14 2013
%o (Python)
%o from sympy import divisors
%o def A062796(n): return sum(d**d for d in divisors(n,generator=True)) # _Chai Wah Wu_, Jun 19 2022
%Y Cf. A000312, A023879.
%K nonn
%O 1,2
%A _Labos Elemer_, Jul 19 2001