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.

A135838 Triangle read by rows: T(n,k) = 2^floor(n/2)*binomial(n-1,k-1).

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 4, 12, 12, 4, 4, 16, 24, 16, 4, 8, 40, 80, 80, 40, 8, 8, 48, 120, 160, 120, 48, 8, 16, 112, 336, 560, 560, 336, 112, 16, 16, 128, 448, 896, 1120, 896, 448, 128, 16, 32, 288, 1152, 2688, 4032, 4032, 2688, 1152, 288, 32
Offset: 1

Views

Author

Gary W. Adamson, Dec 01 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  2,  2;
  2,  4,  2;
  4, 12, 12,  4;
  4, 16, 24, 16,  4;
  8, 40, 80, 80, 40, 8;
  ...
		

Crossrefs

Programs

  • Maple
    A135838 := proc(n,k)
        2^floor(n/2)*binomial(n-1,k-1) ;
    end proc:
    seq(seq( A135838(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Aug 15 2022
  • Mathematica
    T[n_, k_]:= 2^Floor[n/2]*Binomial[n-1, k-1];
    Table[T[n, k], {n,12}, {k,n}] //Flatten (* G. C. Greubel, Feb 07 2022 *)
  • PARI
    A(n,k) = 2^(n\2)*binomial(n-1,k-1);
    concat(vector(10, n, vector(n, k, A(n,k))))  \\ Gheorghe Coserea, May 18 2016
    
  • Sage
    flatten([[2^(n//2)*binomial(n-1, k-1) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Feb 07 2022

Formula

M * Pascal's triangle as infinite lower triangular matrices, where M = a triangle with (1, 2, 2, 4, 4, 8, 8, 16, 16, ...) in the main diagonal and the rest zeros.
Sum_{k=1..n} T(n, k) = A094015(n-1).
From G. C. Greubel, Feb 07 2022: (Start)
T(n, n-k) = T(n, k).
T(n, 1) = A016116(n).
T(n, 2) = 2*A093968(n-1).
T(2*n-1, n) = A059304(n-1).
T(2*n, n) = 2*A069720(n). (End)