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.

A131239 Triangle, T(n,k) = 3*A007318(n,k) - 2*A046854(n,k), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 5, 7, 1, 1, 8, 12, 10, 1, 1, 9, 24, 22, 13, 1, 1, 12, 33, 52, 35, 16, 1, 1, 13, 51, 85, 95, 51, 19, 1, 1, 16, 64, 148, 180, 156, 70, 22, 1, 1, 17, 88, 212, 348, 336, 238, 92, 25, 1, 1, 20, 105, 320, 560, 714, 574, 344, 117, 28, 1, 1, 21, 135, 425, 920, 1274, 1330, 918, 477, 145, 31, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 21 2007

Keywords

Comments

Row sums = A074878: (1, 2, 6, 14, 32, 70, 239, ...).

Examples

			First few rows of the triangle:
  1;
  1,  1;
  1,  4,  1;
  1,  5,  7,  1;
  1,  8, 12, 10,  1;
  1,  9, 24, 22, 13,  1;
  1, 12, 33, 52, 35, 16, 1;
  ...
		

Crossrefs

Programs

  • GAP
    B:=Binomial;; Flat(List([0..12], n-> List([0..n], k-> 3*B(n,k) - 2*B(Int((n+k)/2), k) ))); # G. C. Greubel, Jul 12 2019
  • Magma
    B:=Binomial; [3*B(n,k) - 2*B(Floor((n+k)/2), k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    With[{B=Binomial}, Table[3*B[n,k] - 2*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) = 3*b(n,k) - 2*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; [[3*b(n,k) - 2*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) = 3*A007318(n,k) - 2*A046854(n,k) as infinite lower triangular matrices.
T(n,k) = 3*binomial(n,k) - 2*binomial(floor((n+k)/2), k). - G. C. Greubel, Jul 12 2019

Extensions

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