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.

A139524 Triangle T(n,k) read by rows: the coefficient of [x^k] of the polynomial 2*(x+1)^n + 2^n in row n, column k.

Original entry on oeis.org

3, 4, 2, 6, 4, 2, 10, 6, 6, 2, 18, 8, 12, 8, 2, 34, 10, 20, 20, 10, 2, 66, 12, 30, 40, 30, 12, 2, 130, 14, 42, 70, 70, 42, 14, 2, 258, 16, 56, 112, 140, 112, 56, 16, 2, 514, 18, 72, 168, 252, 252, 168, 72, 18, 2, 1026, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Jun 09 2008

Keywords

Examples

			Triangle begins as:
     3;
     4,  2;
     6,  4,  2;
    10,  6,  6,   2;
    18,  8, 12,   8,   2;
    34, 10, 20,  20,  10,   2;
    66, 12, 30,  40,  30,  12,   2;
   130, 14, 42,  70,  70,  42,  14,   2;
   258, 16, 56, 112, 140, 112,  56,  16,  2;
   514, 18, 72, 168, 252, 252, 168,  72, 18,  2;
  1026, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2;
		

References

  • Advanced Number Theory, Harvey Cohn, Dover Books, 1963, Pages 88-89

Crossrefs

Programs

  • Magma
    A139524:= func< n,k | k eq 0 select 2+2^n else 2*Binomial(n,k) >;
    [A139524(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 02 2021
    
  • Mathematica
    (* First program *)
    T[n_, k_]:= SeriesCoefficient[Series[2*(1+x)^n + 2^n, {x, 0, 20}], k];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, May 02 2021 *)
    (* Second program *)
    T[n_, k_]:= T[n, k] = If[k==0, 2 + 2^n, 2*Binomial[n, k]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 02 2021 *)
  • Sage
    def A139524(n,k): return 2+2^n if (k==0) else 2*binomial(n,k)
    flatten([[A139524(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 02 2021

Formula

Sum_{k=0..n} T(n,k) = 3*2^n = A007283(n).
From R. J. Mathar, Sep 12 2013: (Start)
T(n,0) = 2 + 2^n = A052548(n).
T(n,k) = 2*binomial(n,k) = A028326(n,k) if k>0. (End)