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.

A124959 Triangle read by rows: T(n,k) = a(k)*binomial(n,k) (0 <= k <= n), where a(0)=1, a(1)=2, a(k) = a(k-1) + 3*a(k-2) for k >= 2 (a(k) = A006138(k)).

Original entry on oeis.org

1, 1, 2, 1, 4, 5, 1, 6, 15, 11, 1, 8, 30, 44, 26, 1, 10, 50, 110, 130, 59, 1, 12, 75, 220, 390, 354, 137, 1, 14, 105, 385, 910, 1239, 959, 314, 1, 16, 140, 616, 1820, 3304, 3836, 2512, 725, 1, 18, 180, 924, 3276, 7434, 11508, 11304, 6525, 1667, 1, 20, 225, 1320, 5460, 14868, 28770, 37680, 32625, 16670, 3842
Offset: 0

Views

Author

Gary W. Adamson, Nov 13 2006

Keywords

Comments

Sum of entries in row n = A006190(n+1).

Examples

			First few rows of the triangle:
  1;
  1,   2;
  1,   4,   5;
  1,   6,  15,  11;
  1,   8,  30,  44,  26;
  1,  10,  50, 110, 130,  59;
  ...
		

Crossrefs

Programs

  • Magma
    function b(k)
      if k lt 2 then return k+1;
      else return b(k-1) + 3*b(k-2);
      end if;
      return b;
    end function;
    [Binomial(n,k)*b(k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 19 2019
    
  • Maple
    a:=proc(n) if n=0 then 1 elif n=1 then 2 else a(n-1)+3*a(n-2) fi end: T:=(n,k)->a(k)*binomial(n,k): for n from 0 to 10 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_]:= T[n, k]= Simplify[(I*Sqrt[3])^(k-1)*Binomial[n,k]*(I*Sqrt[3]* ChebyshevU[k, 1/(2*I*Sqrt[3])] + ChebyshevU[k-1, 1/(2*I*Sqrt[3])])];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 19 2019 *)
  • PARI
    b(k) = if(k<2, k+1, b(k-1) + 3*b(k-2));
    T(n,k) = binomial(n,k)*b(k);
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Nov 19 2019
    
  • Sage
    @CachedFunction
    def b(k):
        if (k<2): return k+1
        else: return b(k-1) + 3*b(k-2)
    [[binomial(n, k)*b(k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 19 2019

Extensions

Edited by N. J. A. Sloane, Dec 03 2006