login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343276
a(n) = n! * [x^n] -x*(x + 1)*exp(x)/(x - 1)^3.
1
0, 1, 10, 81, 652, 5545, 50886, 506905, 5480056, 64116657, 808856290, 10959016321, 158851484100, 2454385635481, 40285778016862, 700261611998985, 12853532939027056, 248482678808005345, 5047002269952482106, 107466341437781300017, 2394019421567804960380
OFFSET
0,3
FORMULA
a(n) = Sum_{k=0..n} rf(n - k + 1, k)*k^2, where rf is the rising factorial.
a(n) = (2 + n*(n + 2))*a(n - 1)/(n - 1) - (n + 1)*a(n - 2) for n >= 3.
A002775(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(k).
MAPLE
egf := -x*(x + 1)*exp(x)/(x - 1)^3: ser := series(egf, x, 32):
seq(n!*coeff(ser, x, n), n = 0..20);
MATHEMATICA
a[n_] := Sum[Pochhammer[n - k + 1, k]*k^2, {k, 0, n}];
Table[a[n], {n, 0, 20}]
PROG
(SageMath)
def a(n): return sum(rising_factorial(n - k + 1, k)*k^2 for k in (0..n))
print([a(n) for n in (0..20)])
(Python)
def a():
a, b, n = 0, 1, 2
yield 0
while True:
yield b
a, b = b, -(n + 1)*a + ((2 + n*(n + 2))*b)//(n - 1)
n += 1
A343276 = a(); print([next(A343276) for _ in range(21)])
CROSSREFS
Sequence in context: A095004 A037541 A037485 * A363559 A350503 A277205
KEYWORD
nonn
AUTHOR
Peter Luschny, Apr 20 2021
STATUS
approved