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

Row 2 of array in A144502.
5

%I #36 Oct 08 2023 04:43:56

%S 2,7,30,155,946,6687,53822,486355,4877250,53759351,646098622,

%T 8409146187,117836551730,1768850337295,28318532194206,481652022466307,

%U 8673291031865602,164849403644999655,3297954931572397790,69274457019123638011,1524368720086682440242

%N Row 2 of array in A144502.

%H Robert Israel, <a href="/A144495/b144495.txt">Table of n, a(n) for n = 0..447</a>

%F E.g.f.: exp(x)*(2-x)/(1-x)^3.

%F a(n) = (1/2) * (floor((n+1)*(n+1)!*e) + floor(n*n!*e)). [_Gary Detlefs_, Jun 06 2010]

%F a(n) = (1/2) * ( A001339(n) + A001339(n+1) ). [_Gary Detlefs_, Jun 06 2010]

%F a(n) = (1/2) * (3 + n + (1 + 3*n + n^2) * A000522(n)). - _Gerry Martens_, Oct 02 2016

%F 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

%F From _Peter Bala_, May 27 2022: (Start)

%F a(n) = (1/2)*(A000522(n+2) - A000522(n)).

%F a(n) = (1/2)*Sum_{k = 0..n} binomial(n,k)*(k+4)*(k+1)!; binomial transform of A038720(n+1).

%F a(n) = (1/2)*e*Integral_{x >= 1} x^n*(x^2 - 1)*exp(-x).

%F 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)

%F 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

%p 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):

%p map(f, [$0..40]); # _Robert Israel_, Oct 02 2016

%t (* First program *)

%t t[0, _] = 1; t[n_, 0] := t[n, 0] = t[n-1, 1];

%t t[n_, k_] := t[n, k] = t[n-1, k+1] + k*t[n, k-1];

%t a[n_] := t[2, n];

%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Aug 19 2022 *)

%t (* Second program *)

%t a[n_]:= a[n]= If[n==0, 2, (n*(n^2+3*n+1)*a[n-1] -(n+2))/(n^2+n-1)];

%t Table[a[n], {n,0,40}] (* _G. C. Greubel_, Oct 07 2023 *)

%o (Magma)

%o A144495:= func< n | (&+[Binomial(n,k)*(k+4)*Factorial(k+1) : k in [0..n]])/2 >;

%o [A144495(n): n in [0..40]]; // _G. C. Greubel_, Oct 07 2023

%o (SageMath)

%o def A144495(n): return sum(binomial(n,j)*factorial(j+1)*(j+4) for j in range(n+1))/2

%o [A144495(n) for n in range(41)] # _G. C. Greubel_, Oct 07 2023

%Y Cf. A000522, A001339, A038720, A144496, A144497, A144498.

%Y Cf. A144499, A144500, A144501, A144502, A144503.

%K nonn

%O 0,1

%A _David Applegate_ and _N. J. A. Sloane_, Dec 13 2008