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.

This page as a plain text file.
%I A139524 #10 May 03 2021 01:26:02
%S A139524 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,
%T A139524 2,130,14,42,70,70,42,14,2,258,16,56,112,140,112,56,16,2,514,18,72,
%U A139524 168,252,252,168,72,18,2,1026,20,90,240,420,504,420,240,90,20,2
%N 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.
%D A139524 Advanced Number Theory, Harvey Cohn, Dover Books, 1963, Pages 88-89
%H A139524 G. C. Greubel, <a href="/A139524/b139524.txt">Rows n = 0..50 of the triangle, flattened</a>
%F A139524 Sum_{k=0..n} T(n,k) = 3*2^n = A007283(n).
%F A139524 From _R. J. Mathar_, Sep 12 2013: (Start)
%F A139524 T(n,0) = 2 + 2^n = A052548(n).
%F A139524 T(n,k) = 2*binomial(n,k) = A028326(n,k) if k>0. (End)
%e A139524 Triangle begins as:
%e A139524      3;
%e A139524      4,  2;
%e A139524      6,  4,  2;
%e A139524     10,  6,  6,   2;
%e A139524     18,  8, 12,   8,   2;
%e A139524     34, 10, 20,  20,  10,   2;
%e A139524     66, 12, 30,  40,  30,  12,   2;
%e A139524    130, 14, 42,  70,  70,  42,  14,   2;
%e A139524    258, 16, 56, 112, 140, 112,  56,  16,  2;
%e A139524    514, 18, 72, 168, 252, 252, 168,  72, 18,  2;
%e A139524   1026, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2;
%t A139524 (* First program *)
%t A139524 T[n_, k_]:= SeriesCoefficient[Series[2*(1+x)^n + 2^n, {x, 0, 20}], k];
%t A139524 Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, May 02 2021 *)
%t A139524 (* Second program *)
%t A139524 T[n_, k_]:= T[n, k] = If[k==0, 2 + 2^n, 2*Binomial[n, k]];
%t A139524 Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, May 02 2021 *)
%o A139524 (Magma)
%o A139524 A139524:= func< n,k | k eq 0 select 2+2^n else 2*Binomial(n,k) >;
%o A139524 [A139524(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, May 02 2021
%o A139524 (Sage)
%o A139524 def A139524(n,k): return 2+2^n if (k==0) else 2*binomial(n,k)
%o A139524 flatten([[A139524(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, May 02 2021
%Y A139524 Cf. A007283, A028326, A052548.
%K A139524 nonn,tabl,easy,less
%O A139524 0,1
%A A139524 _Roger L. Bagula_ and _Gary W. Adamson_, Jun 09 2008