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.

A152815 Triangle T(n,k), read by rows given by [1,0,-1,0,0,0,0,0,0,...] DELTA [0,1,-1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 1, 0, 0, 0, 1, 3, 3, 1, 0, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0, 1, 4, 6, 4, 1, 0, 0, 0, 0, 1, 4, 6, 4, 1, 0, 0, 0, 0, 0, 1, 5, 10, 10, 5, 1, 0, 0, 0, 0, 0, 1, 5, 10, 10, 5, 1, 0, 0, 0, 0, 0, 0, 1, 6, 15, 20, 15, 6, 1, 0, 0, 0, 0, 0, 0, 1, 6, 15, 20, 15, 6, 1, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 13 2008

Keywords

Comments

Triangle read by rows, Pascal's triangle (A007318) rows repeated.
Riordan array (1/(1-x), x^2/(1-x^2)). - Philippe Deléham, Feb 27 2012

Examples

			Triangle begins:
  1;
  1, 0;
  1, 1, 0;
  1, 1, 0, 0;
  1, 2, 1, 0, 0;
  1, 2, 1, 0, 0, 0;
  1, 3, 3, 1, 0, 0, 0;
  1, 3, 3, 1, 0, 0, 0, 0;
  1, 4, 6, 4, 1, 0, 0, 0, 0; ...
		

Crossrefs

Cf. A007318, A064861, A152198 (another version), A000931 (diagonal sums), A016116 (row sums).

Programs

  • Haskell
    a152815 n k = a152815_tabl !! n !! k
    a152815_row n = a152815_tabl !! n
    a152815_tabl = [1] : [1,0] : t [1,0] where
       t ys = zs : zs' : t zs' where
         zs' = zs ++ [0]; zs = zipWith (+) ([0] ++ ys) (ys ++ [0])
    -- Reinhard Zumkeller, Feb 28 2012
    
  • Mathematica
    m = 13;
    (* DELTA is defined in A084938 *)
    DELTA[Join[{1, 0, -1}, Table[0, {m}]], Join[{0, 1, -1}, Table[0, {m}]], m] // Flatten (* Jean-François Alcover, Feb 19 2020 *)
    T[n_, k_] := If[n<0, 0, Binomial[Floor[n/2], k]]; (* Michael Somos, Oct 01 2022 *)
  • PARI
    {T(n, k) = if(n<0, 0, binomial(n\2, k))}; /* Michael Somos, Oct 01 2022 */

Formula

T(n,k) = T(n-1,k) + ((1+(-1)^n)/2)*T(n-1,k-1).
G.f.: (1+x)/(1-(1+y)*x^2).
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A016116(n), A108411(n), A213173(n), A074872(n+1) for x = 0,1,2,3,4 respectively. - Philippe Deléham, Nov 26 2011, Apr 22 2013

Extensions

Example corrected by Philippe Deléham, Dec 13 2008