A056788 a(n) = n^n + (n-1)^(n-1).
2, 5, 31, 283, 3381, 49781, 870199, 17600759, 404197705, 10387420489, 295311670611, 9201412118867, 311791207040509, 11414881932150269, 449005897206417391, 18884637964090410991, 845687005960046315793, 40173648337182874339601, 2017766063735610126699403
Offset: 1
Keywords
Examples
a(3) = 2^2 + 3^3 = 4 + 27 = 31.
References
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see equation (6.7).
Links
- Pierre Letouzey, Generalized Hofstadter functions G, H and beyond: numeration systems and discrepancy, arXiv:2502.12615 [cs.DM], 2025. See p. 18.
- Walter Nissen, post on np ( n ) = n^n + (n+1)^(n+1), on home page "Up for the count!". (Updated Oct 02 2012)
Crossrefs
Programs
-
Mathematica
Join[{2}, Table[n^n+(n-1)^(n-1), {n, 2, 20}]] (* T. D. Noe, Aug 13 2004 *) Join[{2},Total/@Partition[Table[n^n,{n,20}],2,1]] (* Harvey P. Dale, Jun 26 2017 *)
-
PARI
A056788(n)=n^n+(n-1)^(n-1) \\ M. F. Hasler, Oct 02 2012
Extensions
Minor corrections by M. F. Hasler, Oct 02 2012
Comments