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.
%I A304236 #45 Aug 08 2025 06:40:49 %S A304236 1,1,1,3,1,6,1,9,9,1,12,27,1,15,54,27,1,18,90,108,1,21,135,270,81,1, %T A304236 24,189,540,405,1,27,252,945,1215,243,1,30,324,1512,2835,1458,1,33, %U A304236 405,2268,5670,5103,729,1,36,495,3240,10206,13608,5103,1,39,594,4455,17010,30618,20412,2187 %N A304236 Triangle T(n,k) = T(n-1,k) + 3*T(n-2,k-1) for k = 0..floor(n/2), with T(0,0) = 1, T(n,k) = 0 for n or k < 0, read by rows. %C A304236 The numbers in rows of the triangle are along skew diagonals pointing top-right in center-justified triangle given in A013610 ((1+3*x)^n). %C A304236 The coefficients in the expansion of 1/(1-x-3x^2) are given by the sequence generated by the row sums. %D A304236 Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 70, 72, 88, 363. %H A304236 G. C. Greubel, <a href="/A304236/b304236.txt">Rows n = 0..100 of the irregular triangle, flattened</a> %H A304236 Zagros Lalo, <a href="/A304236/a304236.pdf">Left-justified triangle</a> %H A304236 Zagros Lalo, <a href="/A304236/a304236_1.pdf">Skew diagonals in center-justified triangle of coefficients in expansion of (1+3x)^n</a> %F A304236 T(n,k) = 3^k*binomial(n-k,k), n >= 0, 0 <= k <= floor(n/2). %e A304236 Triangle begins: %e A304236 1; %e A304236 1; %e A304236 1, 3; %e A304236 1, 6; %e A304236 1, 9, 9; %e A304236 1, 12, 27; %e A304236 1, 15, 54, 27; %e A304236 1, 18, 90, 108; %e A304236 1, 21, 135, 270, 81; %e A304236 1, 24, 189, 540, 405; %e A304236 1, 27, 252, 945, 1215, 243; %e A304236 1, 30, 324, 1512, 2835, 1458; %e A304236 1, 33, 405, 2268, 5670, 5103, 729; %e A304236 1, 36, 495, 3240, 10206, 13608, 5103; %e A304236 1, 39, 594, 4455, 17010, 30618, 20412, 2187; %p A304236 seq(seq( 3^k*binomial(n-k,k), k=0..floor(n/2)), n=0..24); # _G. C. Greubel_, May 12 2021 %t A304236 T[0, 0] = 1; T[n_, k_]:= If[n<0 || k<0, 0, T[n-1, k] + 3*T[n-2, k-1]]; Table[T[n, k], {n, 0, 14}, {k, 0, Floor[n/2]}]//Flatten %t A304236 Table[3^k Binomial[n-k, k], {n, 0, 14}, {k, 0, Floor[n/2]}]//Flatten %o A304236 (PARI) T(n,k) = if ((n<0) || (k<0), 0, if ((n==0) && (k==0), 1, T(n-1,k) + 3*T(n-2,k-1))); %o A304236 tabf(nn) = for (n=0, nn, for (k=0, n\2, print1(T(n,k), ", ")); print); \\ _Michel Marcus_, May 10 2018 %o A304236 (Magma) /* As triangle */ [[3^k*Binomial(n-k,k): k in [0..Floor(n/2)]]: n in [0.. 15]]; // _Vincenzo Librandi_, Sep 05 2018 %o A304236 (Sage) flatten([[3^k*binomial(n-k,k) for k in (0..n//2)] for n in (0..24)]) # _G. C. Greubel_, May 12 2021 %Y A304236 Row sums give A006130. %Y A304236 Cf. A013610. %Y A304236 Sequences of the form 3^k*binomial(n-(q-1)*k, k): A013610 (q=1), this sequence (q=2), A317496 (q=3), A318772 (q=4). %K A304236 tabf,nonn,easy %O A304236 0,4 %A A304236 _Zagros Lalo_, May 08 2018