cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

1, -1, 2, -6, 30, -210, 1890, -20790, 270270, -4054050, 68918850, -1309458150, 27498621150, -632468286450, 15811707161250, -426916093353750, 12380566707258750, -383797567925021250, 12665319741525701250
Offset: 1

Views

Author

Paul Curtz, May 17 2007

Keywords

Comments

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.
Upper left 6 X 6 submatrix of M is
[ 1 0 0 0 0 0 ]
[ 1 1 0 0 0 0 ]
[ 1 3 1 0 0 0 ]
[ 1 5 5 1 0 0 ]
[ 1 7 9 7 1 0 ]
[ 1 9 13 13 9 1 ],
and upper left 6 X 6 submatrix of M^-1 is
[ 1 0 0 0 0 0 ]
[ -1 1 0 0 0 0 ]
[ 2 -3 1 0 0 0 ]
[ -6 10 -5 1 0 0 ]
[ 30 -50 26 -7 1 0 ]
[ -210 350 -182 50 -9 1 ].
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).

Crossrefs

Programs

  • 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
  • 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
    
  • 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
    
  • Maple
    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
  • Mathematica
    a[n_]:= -(2*n-5)*a[n-1]; a[1]=1; a[2]=-1; a[3]=2; Array[a, 20] (* Robert G. Wilson v *)
    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 *)
  • 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
    
  • 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
    
  • 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
    
  • 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
    

Formula

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

Extensions

Edited and extended by Klaus Brockhaus and Robert G. Wilson v, May 21 2007