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.

Showing 1-2 of 2 results.

A176788 a(n) = (0!! + 1!! + 2!! + 3!! + ... + (n-1)!!) mod n.

Original entry on oeis.org

0, 0, 1, 3, 0, 0, 1, 7, 0, 2, 6, 3, 12, 10, 12, 3, 13, 6, 11, 7, 3, 8, 14, 15, 12, 22, 15, 3, 19, 12, 16, 11, 30, 14, 17, 15, 17, 34, 9, 7, 26, 24, 36, 19, 42, 8, 2, 3, 24, 12, 48, 35, 2, 42, 52, 31, 15, 22, 51, 27, 32, 56, 24, 27, 22, 30, 6, 31, 54, 52, 12, 15, 7, 56, 12, 15, 52, 48
Offset: 1

Views

Author

Keywords

Examples

			0!! mod 1 = 1 mod 1 = 0.
(0!!+1!!) mod 2 = (1 + 1) mod 2 = 0.
(0!!+1!!+2!!) mod 3 = (1 + 1 + 2) mod 3 = 1.
		

Crossrefs

Programs

Formula

a(n) = A129981(n-1) mod n.

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).
Showing 1-2 of 2 results.