A031971 a(n) = Sum_{k=1..n} k^n.
1, 5, 36, 354, 4425, 67171, 1200304, 24684612, 574304985, 14914341925, 427675990236, 13421957361110, 457593884876401, 16841089312342855, 665478473553144000, 28101527071305611528, 1262899292504270591313, 60182438244917445266889, 3031284048960901518840700
Offset: 1
References
- J.-M. De Koninck et A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 327 pp. 48-200, Ellipses, Paris (2004).
- Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 21.
Links
- T. D. Noe, Table of n, a(n) for n = 1..100
- J. M. Grau, A. M. Oller-Marcen, and J. Sondow, On the congruence 1^m + 2^m + ... + m^m == n (mod m) with n|m, arXiv 1309.7941 [math.NT], 2013-2014.
Crossrefs
Programs
-
Haskell
a031971 = sum . a089072_row -- Reinhard Zumkeller, Mar 18 2013
-
Magma
[&+[(k)^n: k in [0..n]]: n in [1..30]]; // Vincenzo Librandi, Apr 18 2011
-
Maple
a := n->sum('i'^n,'i'=1..n); # alternative A031971 := proc(n) (bernoulli(n+1,n+1)-bernoulli(n+1))/(n+1) ; end proc: # R. J. Mathar, May 10 2013
-
Mathematica
Table[Zeta[-n] - Zeta[-n, n + 1], {n, 25}] (* Alexander Adamchuk, Jul 21 2006 *) Table[Total[Range[n]^n], {n,25}] (* T. D. Noe, Apr 19 2011 *) Table[HarmonicNumber[n, -n], {n, 1, 25}] (* Jean-François Alcover, Apr 09 2015 *)
-
PARI
a(n)=sum(k=1,n,k^n) \\ Charles R Greathouse IV, Jun 05 2015
-
Python
from sympy import harmonic def A031971(n): return harmonic(n,-n) # Chai Wah Wu, Feb 15 2020
Formula
a(n) is asymptotic to (e/(e - 1))*n^n. - Benoit Cloitre, Dec 17 2003
a(n) = zeta(-n) - zeta(-n, n + 1), where zeta(s) is the Riemann zeta function and zeta(s, a) is the Hurwitz zeta function, a generalization of the Riemann zeta function. - Alexander Adamchuk, Jul 21 2006
a(n) == 1 (mod n) <==> n is in A014117 = 1, 2, 6, 42, 1806 (see the link "On the congruence ..."). - Jonathan Sondow, Oct 18 2013
a(n) = n! * [x^n] exp(x)*(exp(n*x) - 1)/(exp(x) - 1). - Ilya Gutkovskiy, Apr 07 2018
a(n) ~ ((e*n+1)/((e-1)*(n+1))) * n^n. - N. J. A. Sloane, Oct 13 2018, based on email from Claude F. Leibovici who claims this is slightly better than Cloitre's version when n is small.
Comments