login
A062796
Inverse Moebius transform of f(n) = n^n (A000312).
32
1, 5, 28, 261, 3126, 46688, 823544, 16777477, 387420517, 10000003130, 285311670612, 8916100495200, 302875106592254, 11112006826381564, 437893890380862528, 18446744073726329093, 827240261886336764178, 39346408075296925042601, 1978419655660313589123980
OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..386 (first 200 terms from Nick Hobson)
FORMULA
a(n) = Sum_{d|n} d^d.
G.f.: Sum_{n>=1} n^n * x^n/(1 - x^n). - Paul D. Hanna, Oct 27 2009
Logarithmic derivative of A023879. - Paul D. Hanna, Sep 05 2012
EXAMPLE
n=6: divisors = {1,2,3,6}; 1^1 + 2^2 + 3^3 + 6^6 = 1 + 4 + 27 + 46656 = 46688 = a(6).
MATHEMATICA
a[n_] := DivisorSum[n, #^# &]; Array[a, 19] (* Jean-François Alcover, Dec 23 2015 *)
PROG
(PARI) vector(17, n, sumdiv(n, d, d^d))
(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
(PARI) a(n) = sumdiv(n, d, d^d ); \\ Joerg Arndt, Apr 14 2013
(Python)
from sympy import divisors
def A062796(n): return sum(d**d for d in divisors(n, generator=True)) # Chai Wah Wu, Jun 19 2022
CROSSREFS
Sequence in context: A362636 A238981 A163694 * A347399 A353009 A343573
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 19 2001
STATUS
approved