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.

A154221 A simple Pascal-like triangle.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 5, 1, 1, 9, 9, 9, 9, 1, 1, 17, 17, 17, 17, 17, 1, 1, 33, 33, 33, 33, 33, 33, 1, 1, 65, 65, 65, 65, 65, 65, 65, 1, 1, 129, 129, 129, 129, 129, 129, 129, 129, 1, 1, 257, 257, 257, 257, 257, 257, 257, 257, 257, 1
Offset: 0

Views

Author

Paul Barry, Jan 05 2009

Keywords

Comments

First column is A094373. Central coefficients are A123166.
Row sums are A154222. Diagonal sums are A154223.

Examples

			Triangle begins
1,
1, 1,
1, 2, 1,
1, 3, 3, 1,
1, 5, 5, 5, 1,
1, 9, 9, 9, 9, 1,
1, 17, 17, 17, 17, 17, 1,
1, 33, 33, 33, 33, 33, 33, 1,
1, 65, 65, 65, 65, 65, 65, 65, 1
		

Programs

  • Magma
    /* As triangle */ [[1+(2^(k-1)-0^k/2)*(2^(n-k-1)-0^(n-k)/2): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 06 2016
  • Maple
    A154221 := proc(n,k)
        local f1,f2 ;
        f1 := 2^(k-1) ;
        if k = 0 then
            f1 := f1-1/2 ;
        end if;
        f2 := 2^(n-k-1) ;
        if n-k = 0 then
            f2 := f2-1/2 ;
        end if;
        1+f1*f2 ;
    end proc:
    seq(seq(A154221(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Feb 05 2015
  • Mathematica
    f[n_, k_] := 1 + (1/4)*(2^(k) - 0^k)*(2^(n - k) - 0^(n - k)); Table[f[n, i], {n, 0, 49}, {i, 0, n}] // Flatten (* G. C. Greubel, Sep 06 2016 *)

Formula

T(n,k)= 1 + (2^(k-1)-0^k/2)*(2^(n-k-1)-0^(n-k)/2).