OFFSET
1,2
COMMENTS
Constant terms of the following polynomials: P(0,x) = -1 and, for n>0, P(n,x) = x*P(n-1,x) + a(n), a(n) chosen such that P(n,n)=0.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..386
FORMULA
a(n) = n^n - Sum_{i=1..n-1} n^(n-i)*a(i).
a(n) = -Sum_{c composition of n} ((-1)^(#c) * Product_{k=1..#c} (n - (Sum_{i<k} c_i))^c_k).
a(n) = n * A374601(n).
EXAMPLE
a(1) = 1^1 = 1.
a(2) = 2^2 - 2^1*a(1) = 2.
a(3) = 3^3 - 3^2*a(1) - 3^1*a(2) = 12.
a(1) = + 1^1 ( 0---1 )
= 1.
a(2) = + 2^2 ( 0-------2 )
- 2^1 * 1^1 ( 0---1---2 )
= 2.
a(3) = + 3^3 ( 0-----------3 )
- 3^2 * 1^1 ( 0---1-------3 )
- 3^1 * 2^2 ( 0-------2---3 )
+ 3^1 * 2^1 * 1^1 ( 0---1---2---3 )
= 12.
MAPLE
a:= proc(n) option remember; `if`(n<1, 0,
n^n-add(n^(n-i)*a(i), i=1..n-1))
end:
seq(a(n), n=1..20); # Alois P. Heinz, Jul 13 2024
MATHEMATICA
a[n_] := a[n] = n^n - Sum[n^(n - i)*a[i], {i, 1, n - 1}]
a /@ Range[20]
PROG
(PARI) a(n)=n^n-sum(i=1, n-1, n^(n-i)*a(i))
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Jul 12 2024
STATUS
approved