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.

A131238 Triangle read by rows: T(n,k) = 2*binomial(n,k) - binomial(floor((n+k)/2), k) (0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 5, 1, 1, 6, 9, 7, 1, 1, 7, 17, 16, 9, 1, 1, 9, 24, 36, 25, 11, 1, 1, 10, 36, 60, 65, 36, 13, 1, 1, 12, 46, 102, 125, 106, 49, 15, 1, 1, 13, 62, 148, 237, 231, 161, 64, 17, 1, 1, 15, 75, 220, 385, 483, 392, 232, 81, 19, 1, 1, 16, 95, 295, 625, 868, 896, 624, 321, 100, 21, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 21 2007

Keywords

Comments

Row sums = A027934: (1, 2, 5, 11, 24, 51, 107, ...).

Examples

			First few rows of the triangle:
  1;
  1,  1;
  1,  3,  1;
  1,  4,  5,  1;
  1,  6,  9,  7,  1;
  1,  7, 17, 16,  9,  1;
  1,  9, 24, 36, 25, 11,  1;
  1, 10, 36, 60, 65, 36, 13, 1;
  ...
		

Crossrefs

Programs

  • GAP
    B:=Binomial;; Flat(List([0..12], n-> List([0..n], k-> 2*B(n,k) - B(Int((n+k)/2), k) ))); # G. C. Greubel, Jul 12 2019
  • Magma
    B:=Binomial; [2*B(n,k) - B(Floor((n+k)/2), k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2019
    
  • Maple
    T := proc (n, k) options operator, arrow; 2*binomial(n, k)-binomial(floor((1/2)*n+(1/2)*k), k) end proc: for n from 0 to 9 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jul 09 2007
  • Mathematica
    With[{B = Binomial}, Table[2*B[n, k] - B[Floor[(n+k)/2], k], {n,0,12}, {k,0,n}]]//Flatten (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    b=binomial; T(n,k) = 2*b(n,k) - b((n+k)\2, k);
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    b=binomial; [[2*b(n,k) - b(floor((n+k)/2), k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 12 2019
    

Formula

T(n,k) = 2*A007318(n,k) - A046854(n,k) as infinite lower triangular matrices, where A007318 = Pascal's triangle and A046854 = Pascal's triangle with repeats, by columns.

Extensions

More terms added by G. C. Greubel, Jul 12 2019