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”).

A144495
Row 2 of array in A144502.
5
2, 7, 30, 155, 946, 6687, 53822, 486355, 4877250, 53759351, 646098622, 8409146187, 117836551730, 1768850337295, 28318532194206, 481652022466307, 8673291031865602, 164849403644999655, 3297954931572397790, 69274457019123638011, 1524368720086682440242
OFFSET
0,1
LINKS
FORMULA
E.g.f.: exp(x)*(2-x)/(1-x)^3.
a(n) = (1/2) * (floor((n+1)*(n+1)!*e) + floor(n*n!*e)). [Gary Detlefs, Jun 06 2010]
a(n) = (1/2) * ( A001339(n) + A001339(n+1) ). [Gary Detlefs, Jun 06 2010]
a(n) = (1/2) * (3 + n + (1 + 3*n + n^2) * A000522(n)). - Gerry Martens, Oct 02 2016
a(n) = ((4+3*n)*a(n-1) - (n+3)*(n-1)*a(n-2) + (n-1)*(n-2)*a(n-3))/2. - Robert Israel, Oct 02 2016
From Peter Bala, May 27 2022: (Start)
a(n) = (1/2)*(A000522(n+2) - A000522(n)).
a(n) = (1/2)*Sum_{k = 0..n} binomial(n,k)*(k+4)*(k+1)!; binomial transform of A038720(n+1).
a(n) = (1/2)*e*Integral_{x >= 1} x^n*(x^2 - 1)*exp(-x).
a(2*n) is even and a(2*n+1) is odd. More generally, a(n+k) == a(n) (mod k) for all n and k. It follows that for each positive integer k, the sequence obtained by reducing a(n) modulo k is periodic, with the exact period dividing k. Various divisibility properties of the sequence follow from this; for example, a(3*n+2) == 0 (mod 3), a(5*n+2) == a(5*n+3) (mod 5), a(7*n+1) == 0 (mod 7) and a(11*n+4) == 0 (mod 11). (End)
a(n) = (n*(n^2 + 3*n + 1)*a(n-1) - (n + 2))/(n^2 + n - 1), with a(0) = 2. - G. C. Greubel, Oct 07 2023
MAPLE
f:= rectoproc({a(n)=((4+3*n)*a(n-1)-(n+3)*(n-1)*a(n-2)+(n-1)*(n-2)*a(n-3))/2, a(0)=2, a(1)=7, a(2)=30}, a(n), remember):
map(f, [$0..40]); # Robert Israel, Oct 02 2016
MATHEMATICA
(* First program *)
t[0, _] = 1; t[n_, 0] := t[n, 0] = t[n-1, 1];
t[n_, k_] := t[n, k] = t[n-1, k+1] + k*t[n, k-1];
a[n_] := t[2, n];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 19 2022 *)
(* Second program *)
a[n_]:= a[n]= If[n==0, 2, (n*(n^2+3*n+1)*a[n-1] -(n+2))/(n^2+n-1)];
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Oct 07 2023 *)
PROG
(Magma)
A144495:= func< n | (&+[Binomial(n, k)*(k+4)*Factorial(k+1) : k in [0..n]])/2 >;
[A144495(n): n in [0..40]]; // G. C. Greubel, Oct 07 2023
(SageMath)
def A144495(n): return sum(binomial(n, j)*factorial(j+1)*(j+4) for j in range(n+1))/2
[A144495(n) for n in range(41)] # G. C. Greubel, Oct 07 2023
KEYWORD
nonn
AUTHOR
STATUS
approved