OFFSET
0,4
LINKS
FORMULA
a(0) = 1 and a(n) = (n-1)! * Sum_{k=1..n} (k-1)*a(n-k)/(n-k)! for n > 0.
E.g.f.: (1 - x) * exp(x/(1 - x)). - Ilya Gutkovskiy, Jul 27 2020
a(n) = (n!/(n-1))*( 2*LaguerreL(n-1, -1) - LaguerreL(n, -1) ) with a(0) = 1, a(1) = 0. - G. C. Greubel, Mar 10 2021
a(n) ~ n^(n - 3/4) * exp(-1/2 + 2*sqrt(n) - n) / sqrt(2) * (1 - 65/(48*sqrt(n))). - Vaclav Kotesovec, Mar 10 2021, minor term corrected Dec 01 2021
From Peter Luschny, Feb 20 2022: (Start)
a(n) = n! * Sum_{k=0..n} (-1)^k * LaguerreL(n-k, k-1, -1).
a(n) = 2*(n - 1)*a(n - 1) - (n^2 - 4*n + 3)*a(n - 2) for n >= 3. (End)
From Peter Bala, May 26 2023: (Start)
a(n) = Sum_{k = 0..n} |Stirling1(n,k)|*A000296(k) (follows from the fundamental theorem of Riordan arrays).
Let k be a positive integer. The sequence obtained by reducing a(n) modulo k is purely periodic with the period dividing k. For example, modulo 7 we obtain the purely periodic sequence [1, 0, 1, 4, 0, 3, 2, 1, 0, 1, 4, 0, 3, 2, ...] of period 7. Cf. A047974. (End)
MAPLE
a := proc(n) option remember; if n < 3 then [1, 0, 1][n+1] else
-(n^2 - 4*n + 3)*a(n - 2) + (2*n - 2)*a(n - 1) fi end:
seq(a(n), n = 0..21); # Peter Luschny, Feb 20 2022
MATHEMATICA
Table[If[n<2, 1-n, (n!/(n-1))*(2*LaguerreL[n-1, -1] - LaguerreL[n, -1])], {n, 0, 30}] (* G. C. Greubel, Mar 10 2021 *)
PROG
(PARI) {a(n) = n!*polcoeff(exp(sum(k=1, n, (k-1)*x^k/k)+x*O(x^n)), n)}
(Magma)
l:= func< n, a, b | Evaluate(LaguerrePolynomial(n, a), b) >;
[1, 0]cat[(Factorial(n)/(n-1))*(2*l(n-1, 0, -1) - l(n, 0, -1)): n in [2..30]]; // G. C. Greubel, Mar 10 2021
(Sage) [1-n if n<2 else (factorial(n)/(n-1))*(2*gen_laguerre(n-1, 0, -1) - gen_laguerre(n, 0, -1)) for n in (0..30)] # G. C. Greubel, Mar 10 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Oct 20 2017
STATUS
approved