login
A062811
a(n) = Sum_{i=1..n} i^(n - i) + (i - n)^i.
4
1, 1, 3, 9, 21, 65, 215, 713, 2809, 11425, 49339, 234825, 1148013, 6009153, 33216239, 190115849, 1152491825, 7244099617, 47387741107, 323632894729, 2280785100549, 16702573959489, 126413562204231, 986688266888777
OFFSET
1,3
LINKS
EXAMPLE
a(3) = 1^2 + (-2)^1 + 2^1 + (-1)^2 + 3^0 + 0^3 = 3.
MATHEMATICA
Sum[i^(n - i) + (-1)^i*(n - i)^i, {i, 1, n}]
PROG
(PARI) a(n) = sum(i=1, n, i^(n-i) + (i-n)^i); \\ Michel Marcus, Mar 24 2019
CROSSREFS
Sequence in context: A237122 A326313 A073947 * A363693 A236856 A338534
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Jun 23 2001
STATUS
approved