login
A341331
a(n) = n^n - (n-1)^n - (n-2)^n - ... - 1^n.
1
1, 3, 18, 158, 1825, 26141, 446782, 8869820, 200535993, 5085658075, 142947350986, 4410243535402, 148156328308105, 5382924338773177, 210309307208574750, 8791961076113491704, 391581231268402937041, 18510377905675629883959, 925555262359725659407258
OFFSET
1,2
LINKS
FORMULA
a(n) = A000312(n) - A121706(n).
a(n) = - A290844(n-1,n) for n > 1.
MAPLE
f:= proc(n) local k; n^n - add(k^n, k=1..n-1) end proc:
map(f, [$1..30]); # Robert Israel, Feb 10 2021
MATHEMATICA
a[n_] := n^n - Sum[k^n, {k, 0, n - 1}]; Array[a, 20] (* Amiram Eldar, Apr 28 2021 *)
PROG
(PARI) a(n) = n^n-sum(k=0, n-1, k^n);
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Feb 09 2021
STATUS
approved