[go: up one dir, main page]

login
a(1) = 1, a(2) = -1, a(3) = 2; for n > 3, a(n) = -(2*n-5)*a(n-1).
3

%I #22 Sep 12 2024 17:49:11

%S 1,-1,2,-6,30,-210,1890,-20790,270270,-4054050,68918850,-1309458150,

%T 27498621150,-632468286450,15811707161250,-426916093353750,

%U 12380566707258750,-383797567925021250,12665319741525701250

%N a(1) = 1, a(2) = -1, a(3) = 2; for n > 3, a(n) = -(2*n-5)*a(n-1).

%C Sequence is also the first column of the inverse of the infinite lower triangular matrix M, where M(j,k) = 1+2*(k-1)*(j-k) for k < j, M(j,k) = 1 for k = j, M(j,k) = 0 for k > j.

%C Upper left 6 X 6 submatrix of M is

%C [ 1 0 0 0 0 0 ]

%C [ 1 1 0 0 0 0 ]

%C [ 1 3 1 0 0 0 ]

%C [ 1 5 5 1 0 0 ]

%C [ 1 7 9 7 1 0 ]

%C [ 1 9 13 13 9 1 ],

%C and upper left 6 X 6 submatrix of M^-1 is

%C [ 1 0 0 0 0 0 ]

%C [ -1 1 0 0 0 0 ]

%C [ 2 -3 1 0 0 0 ]

%C [ -6 10 -5 1 0 0 ]

%C [ 30 -50 26 -7 1 0 ]

%C [ -210 350 -182 50 -9 1 ].

%C Row sums of M are 1, 2, 5, 12, 25, 46, ... (see A116731); diagonal sums of M are 1, 1, 2, 4, 7, 13, 20, 32, 45, 65, 86, 116, 147, 189, ... with first differences 0, 1, 2, 3, 6, 7, 12, 13, 20, 21, 30, 31, 42, ... and second differences 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, ... (see A093178).

%H G. C. Greubel, <a href="/A129779/b129779.txt">Table of n, a(n) for n = 1..400</a>

%F a(n) = (-1)^(n-1)*A097801(n-2) = (-1)^(n-1)*(2*(n-2))!/((n-2)!*2^(n-3)) for n > 2, with a(1)=1, a(2)=-1.

%F G.f.: 1 + x - x*W(0) , where W(k) = 1 + 1/( 1 - x*(2*k+1)/( x*(2*k+1) - 1/W(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Aug 22 2013

%p seq(`if`(n<3, (-1)^(n-1), (-1)^(n-1)*(2*n-5)!/(2^(n-4)*(n-3)!)), n=1..25); # _G. C. Greubel_, Nov 25 2019

%t a[n_]:= -(2*n-5)*a[n-1]; a[1]=1; a[2]=-1; a[3]=2; Array[a, 20] (* _Robert G. Wilson v_ *)

%t Table[If[n<3, (-1)^(n-1), (-1)^(n+1)*(2*n-5)!/(2^(n-4)*(n-3)!)], {n,25}] (* _G. C. Greubel_, Nov 25 2019 *)

%o (PARI) {m=19; print1(1, ",", -1, ","); print1(a=2, ","); for(n=4, m, k=-(2*n-5)*a; print1(k, ","); a=k)} \\ _Klaus Brockhaus_, May 21 2007

%o (PARI) {print1(1, ",", -1, ","); for(n=3, 19, print1((-1)^(n-1)*(2*(n-2))!/((n-2)!*2^(n-3)), ","))} \\ _Klaus Brockhaus_, May 21 2007

%o (PARI) {m=19; M=matrix(m, m, j, k, if(k>j, 0, if(k==j, 1, 1+2*(k-1)*(j-k)))); print((M^-1)[, 1]~)} \\ _Klaus Brockhaus_, May 21 2007

%o (Magma) m:=19; M:=Matrix(IntegerRing(), m, m, [< j, k, Maximum(0, 1+2*(k-1)*(j-k)) > : j, k in [1..m] ] ); Transpose(ColumnSubmatrix(M^-1, 1, 1)); // _Klaus Brockhaus_, May 21 2007

%o (Magma) F:=Factorial; [1,-1] cat [(-1)^(n+1)*F(2*n-5)/(2^(n-4)*F(n-3)): n in [3..25]]; // _G. C. Greubel_, Nov 25 2019

%o (Sage) f=factorial; [1,-1]+[(-1)^(n+1)*f(2*n-5)/(2^(n-4)*f(n-3)) for n in (3..25)] # _G. C. Greubel_, Nov 25 2019

%o (GAP) F:=Factorial;; Concatenation([1,-1], List([3..25], n-> (-1)^(n+1)*F(2*n-5)/(2^(n-4)*F(n-3)) )); # _G. C. Greubel_, Nov 25 2019

%Y Cf. A093178, A097801, A116731.

%K sign

%O 1,3

%A _Paul Curtz_, May 17 2007

%E Edited and extended by _Klaus Brockhaus_ and _Robert G. Wilson v_, May 21 2007