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.

A172088 Triangle: T(n,m) = n!! - m!! - (n-m)!! read by rows 0 <= m <= n, where ()!! are the double factorials.

Original entry on oeis.org

-1, -1, -1, -1, 0, -1, -1, 0, 0, -1, -1, 4, 4, 4, -1, -1, 6, 10, 10, 6, -1, -1, 32, 38, 42, 38, 32, -1, -1, 56, 88, 94, 94, 88, 56, -1, -1, 278, 334, 366, 368, 366, 334, 278, -1, -1, 560, 838, 894, 922, 922, 894, 838, 560, -1, -1, 2894, 3454, 3732, 3784, 3810, 3784, 3732, 3454, 2894, -1
Offset: 0

Views

Author

Roger L. Bagula, Jan 25 2010

Keywords

Comments

Row sums are {-1, -2, -2, -2, 10, 30, 180, 474, 2322, 6426, 31536, ...}; n-th row sum is (n+1)*n!! - 2*A129981(n).

Examples

			Triangle begins
  -1;
  -1,   -1;
  -1,    0,   -1;
  -1,    0,    0,   -1;
  -1,    4,    4,    4,   -1;
  -1,    6,   10,   10,    6,   -1;
  -1,   32,   38,   42,   38,   32,   -1;
  -1,   56,   88,   94,   94,   88,   56,   -1;
  -1,  278,  334,  366,  368,  366,  334,  278,   -1;
  -1,  560,  838,  894,  922,  922,  894,  838,  560,   -1;
  -1, 2894, 3454, 3732, 3784, 3810, 3784, 3732, 3454, 2894, -1;
		

Crossrefs

Programs

  • Magma
    F2:=func< n | &*[n..2 by -2] >;
    [F2(n) - F2(k) - F2(n-k): k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 05 2019
    
  • Maple
    A172088 := proc(n,m)
            doublefactorial(n)-doublefactorial(m)-doublefactorial(n-m) ;
    end proc:
    seq(seq(A172088(n,m),m=0..n),n=0..10) ; # R. J. Mathar, Oct 11 2011
  • Mathematica
    T[n_, k_] = n!! -k!! -(n-k)!!; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten
  • PARI
    f2(n) = prod(j=0, (n-1)\2, n-2*j);
    T(n,k) = f2(n) - f2(k) - f2(n-k); \\ G. C. Greubel, Dec 05 2019
    
  • Sage
    def T(n, k): return (n).multifactorial(2) - (k).multifactorial(2) - (n-k).multifactorial(2)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 05 2019

Formula

T(n,m) = A006882(n) - A006882(m) - A006882(n-m).