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.

A112295 Inverse of a double factorial related triangle.

Original entry on oeis.org

1, -1, 1, 0, -3, 1, 0, 0, -5, 1, 0, 0, 0, -7, 1, 0, 0, 0, 0, -9, 1, 0, 0, 0, 0, 0, -11, 1, 0, 0, 0, 0, 0, 0, -13, 1, 0, 0, 0, 0, 0, 0, 0, -15, 1, 0, 0, 0, 0, 0, 0, 0, 0, -17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -23, 1
Offset: 0

Views

Author

Paul Barry, Sep 01 2005

Keywords

Comments

Inverse of A112292. Similar results can be obtained for higher factorials.

Examples

			Triangle begins
   1;
  -1,  1;
   0, -3,  1;
   0,  0, -5,  1;
   0,  0,  0, -7,  1;
   0,  0,  0,  0, -9,   1;
   0,  0,  0,  0,  0, -11,  1;
		

Crossrefs

Programs

  • Magma
    A112295:= func< n,k | k eq n select 1 else k eq n-1 select 1-2*n else 0 >;
    [A112295(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 17 2021
  • Mathematica
    T[n_, k_]:= If[k==n, 1, If[k==n-1, 1-2*n, 0]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 17 2021 *)
  • Sage
    def A112295(n,k): return 1 if k==n else 1-2*n if k==n-1 else 0
    flatten([[A112295(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Feb 17 2021
    

Formula

From G. C. Greubel, Feb 17 2021: (Start)
T(n, k) = 1 - 2*n if k = n-1 otherwise 0, with T(n, n) = 1.
Sum_{k=0..n} T(n, k) = 1 - 2*n - [n=0]. (End)