OFFSET
1,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..600
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
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Jun 23 2001
STATUS
approved