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.

Showing 1-5 of 5 results.

A038221 Triangle whose (i,j)-th entry is binomial(i,j)*3^(i-j)*3^j.

Original entry on oeis.org

1, 3, 3, 9, 18, 9, 27, 81, 81, 27, 81, 324, 486, 324, 81, 243, 1215, 2430, 2430, 1215, 243, 729, 4374, 10935, 14580, 10935, 4374, 729, 2187, 15309, 45927, 76545, 76545, 45927, 15309, 2187, 6561, 52488, 183708, 367416, 459270, 367416, 183708, 52488, 6561
Offset: 0

Views

Author

Keywords

Comments

Triangle of coefficients in expansion of (3 + 3x)^n = 3^n (1 +x)^n, where n is a nonnegative integer. (Coefficients in expansion of (1 +x)^n are given in A007318: Pascal's triangle). - Zagros Lalo, Jul 23 2018

Examples

			Triangle begins as:
     1;
     3,     3;
     9,    18,      9;
    27,    81,     81,     27;
    81,   324,    486,    324,     81;
   243,  1215,   2430,   2430,   1215,    243;
   729,  4374,  10935,  14580,  10935,   4374,    729;
  2187, 15309,  45927,  76545,  76545,  45927,  15309,  2187;
  6561, 52488, 183708, 367416, 459270, 367416, 183708, 52488, 6561;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 44, 48

Crossrefs

Columns k: A000244 (k=0), 3*A027471 (k=1), 3^2*A027472 (k=2), 3^3*A036216 (k=3), 3^4*A036217 (k=4), 3^5*A036219 (k=5), 3^6*A036220 (k=6), 3^7*A036221 (k=7), 3^8*A036222 (k=8), 3^9*A036223 (k=9), 3^10*A172362 (k=10).

Programs

  • GAP
    Flat(List([0..8],i->List([0..i],j->Binomial(i,j)*3^(i-j)*3^j))); # Muniru A Asiru, Jul 23 2018
    
  • Haskell
    a038221 n = a038221_list !! n
    a038221_list = concat $ iterate ([3,3] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Magma
    [3^n*Binomial(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Oct 17 2022
    
  • Mathematica
    (* programs from Zagros Lalo, Jul 23 2018 *)
    t[0, 0]=1; t[n_, k_]:= t[n, k]= If[n<0 || k<0, 0, 3 t[n-1, k] + 3 t[n-1, k-1]]; Table[t[n, k], {n,0,10}, {k,0,n}]//Flatten
    Table[CoefficientList[Expand[3^n *(1+x)^n], x], {n,0,10}]//Flatten
    Table[3^n Binomial[n, k], {n,0,10}, {k,0,n}]//Flatten  (* End *)
  • SageMath
    def A038221(n,k): return 3^n*binomial(n,k)
    flatten([[A038221(n,k) for k in range(n+1)] for n in range(10)]) # G. C. Greubel, Oct 17 2022

Formula

G.f.: 1/(1 - 3*x - 3*x*y). - Ilya Gutkovskiy, Apr 21 2017
T(0,0) = 1; T(n,k) = 3 T(n-1,k) + 3 T(n-1,k-1) for k = 0...n; T(n,k)=0 for n or k < 0. - Zagros Lalo, Jul 23 2018
From G. C. Greubel, Oct 17 2022: (Start)
T(n, k) = T(n, n-k).
T(n, n) = A000244(n).
T(n, n-1) = 3*A027471(n).
T(n, n-2) = 9*A027472(n+1).
T(n, n-3) = 27*A036216(n-3).
T(n, n-4) = 81*A036217(n-4).
T(n, n-5) = 243*A036219(n-5).
Sum_{k=0..n} T(n, k) = A000400(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A030195(n+1), n >= 0.
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A057083(n).
T(n, k) = 3^k * A027465(n, k). (End)

A317496 Triangle T(n,k) = T(n-1,k) + 3*T(n-3,k-1) for k = 0..floor(n/3) with T(0,0) = 1, T(n,k) = 0 for n or k < 0, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 6, 1, 9, 1, 12, 9, 1, 15, 27, 1, 18, 54, 1, 21, 90, 27, 1, 24, 135, 108, 1, 27, 189, 270, 1, 30, 252, 540, 81, 1, 33, 324, 945, 405, 1, 36, 405, 1512, 1215, 1, 39, 495, 2268, 2835, 243, 1, 42, 594, 3240, 5670, 1458, 1, 45, 702, 4455, 10206, 5103, 1, 48, 819, 5940, 17010, 13608, 729
Offset: 0

Views

Author

Zagros Lalo, Jul 31 2018

Keywords

Comments

The numbers in rows of the triangle are along a "second layer" of skew diagonals pointing top-right in center-justified triangle given in A013610 ((1+3*x)^n) and along a "second layer" of skew diagonals pointing top-left in center-justified triangle given in A027465 ((3+x)^n), see links. (Note: First layer of skew diagonals in center-justified triangles of coefficients in expansions of (1+3*x)^n and (3+x)^n are given in A304236 and A304249 respectively.)
The coefficients in the expansion of 1/(1-x-3x^3) are given by the sequence generated by the row sums.
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 1.863706527819..., when n approaches infinity.

Examples

			Triangle begins:
  1;
  1;
  1;
  1,  3;
  1,  6;
  1,  9;
  1, 12,   9;
  1, 15,  27;
  1, 18,  54;
  1, 21,  90,   27;
  1, 24, 135,  108;
  1, 27, 189,  270;
  1, 30, 252,  540,    81;
  1, 33, 324,  945,   405;
  1, 36, 405, 1512,  1215;
  1, 39, 495, 2268,  2835,   243;
  1, 42, 594, 3240,  5670,  1458;
  1, 45, 702, 4455, 10206,  5103;
  1, 48, 819, 5940, 17010, 13608, 729;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 364-366.

Crossrefs

Row sums give A084386.
Sequences of the form 3^k*binomial(n-(q-1)*k, k): A013610 (q=1), A304236 (q=2), this sequence (q=3), A318772 (q=4).

Programs

  • GAP
    Flat(List([0..20],n->List([0..Int(n/3)],k->3^k/(Factorial(n-3*k)*Factorial(k))*Factorial(n-2*k)))); # Muniru A Asiru, Aug 01 2018
    
  • Magma
    [3^k*Binomial(n-2*k,k): k in [0..Floor(n/3)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k] = 3^k*(n-2*k)!/((n-3*k)!*k!); Table[T[n, k], {n, 0, 18}, {k, 0, Floor[n/3]} ]//Flatten
    T[0, 0] = 1; T[n_, k_]:= T[n, k] = If[n<0 || k<0, 0, T[n-1, k] + 3T[n-3, k-1]]; Table[T[n, k], {n, 0, 18}, {k, 0, Floor[n/3]}]//Flatten
  • Sage
    flatten([[3^k*binomial(n-2*k,k) for k in (0..n//3)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = 3^k * (n-2*k)!/ (k! * (n-3*k)!) where n is a nonnegative integer and k = 0..floor(n/3).

A317497 Triangle T(n,k) = 3*T(n-1,k) + T(n-3,k-1) for k = 0..floor(n/3) with T(0,0) = 1 and T(n,k) = 0 for n or k < 0, read by rows.

Original entry on oeis.org

1, 3, 9, 27, 1, 81, 6, 243, 27, 729, 108, 1, 2187, 405, 9, 6561, 1458, 54, 19683, 5103, 270, 1, 59049, 17496, 1215, 12, 177147, 59049, 5103, 90, 531441, 196830, 20412, 540, 1, 1594323, 649539, 78732, 2835, 15, 4782969, 2125764, 295245, 13608, 135, 14348907, 6908733, 1082565, 61236, 945, 1
Offset: 0

Views

Author

Zagros Lalo, Jul 31 2018

Keywords

Comments

The numbers in rows of the triangle are along a "second layer" of skew diagonals pointing top-left in center-justified triangle given in A013610 ((1+3*x)^n) and along a "second layer" of skew diagonals pointing top-right in center-justified triangle given in A027465 ((3+x)^n), see links. (Note: First layer of skew diagonals in triangles of coefficients in expansions of (1+3*x)^n and (3+x)^n are given in A304236 and A304249 respectively.)
The coefficients in the expansion of 1/(1-3x-x^3) are given by the sequence generated by the row sums.
The row sums give A052541.
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 3.1038034027355..., when n approaches infinity.

Examples

			Triangle begins:
         1;
         3;
         9;
        27,        1;
        81,        6;
       243,       27;
       729,      108,       1;
      2187,      405,       9;
      6561,     1458,      54;
     19683,     5103,     270,      1;
     59049,    17496,    1215,     12;
    177147,    59049,    5103,     90;
    531441,   196830,   20412,    540,    1;
   1594323,   649539,   78732,   2835,   15;
   4782969,  2125764,  295245,  13608,  135;
  14348907,  6908733, 1082565,  61236,  945,  1;
  43046721, 22320522, 3897234, 262440, 5670, 18;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 364-366

Crossrefs

Row sums give A052541.
Cf. A000244 (column 0), A027471 (column 1), A027472 (column 2), A036216 (column 3), A036217 (column 4).
Sequences of the form 3^(n-q*k)*binomial(n-(q-1)*k, k): A027465 (q=1), A304249 (q=2), this sequence (q=3), A318773 (q=4).

Programs

  • GAP
    Flat(List([0..16],n->List([0..Int(n/3)],k->3^(n-3*k)/(Factorial(n-3*k)*Factorial(k))*Factorial(n-2*k)))); # Muniru A Asiru, Aug 01 2018
    
  • Magma
    [3^(n-3*k)*Binomial(n-2*k,k): k in [0..Floor(n/3)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k] = 3^(n-3k)(n-2k)!/((n-3k)! k!); Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/3]} ]//Flatten
    T[0, 0] = 1; T[n_, k_]:= T[n, k] = If[n<0 || k<0, 0, 3 T[n-1, k] + T[n-3, k-1]]; Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/3]}]//Flatten
  • Sage
    flatten([[3^(n-3*k)*binomial(n-2*k,k) for k in (0..n//3)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = 3^(n-3*k) * (n-2*k)!/(k! * (n-3*k)!) where n is a nonnegative integer and k = 0..floor(n/3).

A318772 Triangle read by rows: T(0,0) = 1; T(n,k) = T(n-1,k) + 3 * T(n-4,k-1) for k = 0..floor(n/4); T(n,k)=0 for n or k < 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 6, 1, 9, 1, 12, 1, 15, 9, 1, 18, 27, 1, 21, 54, 1, 24, 90, 1, 27, 135, 27, 1, 30, 189, 108, 1, 33, 252, 270, 1, 36, 324, 540, 1, 39, 405, 945, 81, 1, 42, 495, 1512, 405, 1, 45, 594, 2268, 1215, 1, 48, 702, 3240, 2835, 1, 51, 819, 4455, 5670, 243, 1, 54, 945, 5940, 10206, 1458
Offset: 0

Views

Author

Zagros Lalo, Sep 04 2018

Keywords

Comments

The numbers in rows of the triangle are along a "third layer" skew diagonals pointing top-right in center-justified triangle given in A013610 ((1+3*x)^n) and along a "third layer" skew diagonals pointing top-left in center-justified triangle given in A027465 ((3+x)^n), see links. (Note: First layer of skew diagonals in center-justified triangles of coefficients in expansions of (1+3*x)^n and (3+x)^n are given in A304236 and A304249 respectively.)
The coefficients in the expansion of 1/(1-x-3*x^4) are given by the sequence generated by the row sums.
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 1.6580980673722..., when n approaches infinity.

Examples

			Triangle begins:
  1;
  1;
  1;
  1;
  1,  3;
  1,  6;
  1,  9;
  1, 12;
  1, 15,   9;
  1, 18,  27;
  1, 21,  54;
  1, 24,  90;
  1, 27, 135,   27;
  1, 30, 189,  108;
  1, 33, 252,  270;
  1, 36, 324,  540;
  1, 39, 405,  945,   81;
  1, 42, 495, 1512,  405;
  1, 45, 594, 2268, 1215;
  ...
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3.

Crossrefs

Row sums give A318774.

Programs

  • Magma
    [3^k*Binomial(n-3*k,k): k in [0..Floor(n/4)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k]= 3^k(n-3k)!/((n-4k)! k!); Table[T[n, k], {n, 0, 21}, {k, 0, Floor[n/4]} ] // Flatten
    T[0, 0] = 1; T[n_, k_] := T[n, k] = If[n<0 || k<0, 0, T[n-1, k] + 3T[n-4, k-1]]; Table[T[n, k], {n, 0, 21}, {k, 0, Floor[n/4]}] // Flatten
  • Sage
    flatten([[3^k*binomial(n-3*k,k) for k in (0..n//4)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = 3^k * (n - 3*k)!/ ((n - 4*k)! k!), where n >= 0 and 0 <= k <= floor(n/4).

A318773 Triangle T(n,k) = 3*T(n-1,k) + T(n-4,k-1) for k = 0..floor(n/4), with T(0,0) = 1 and T(n,k) = 0 for n or k < 0, read by rows.

Original entry on oeis.org

1, 3, 9, 27, 81, 1, 243, 6, 729, 27, 2187, 108, 6561, 405, 1, 19683, 1458, 9, 59049, 5103, 54, 177147, 17496, 270, 531441, 59049, 1215, 1, 1594323, 196830, 5103, 12, 4782969, 649539, 20412, 90, 14348907, 2125764, 78732, 540, 43046721, 6908733, 295245, 2835, 1, 129140163, 22320522, 1082565, 13608, 15
Offset: 0

Views

Author

Zagros Lalo, Sep 04 2018

Keywords

Comments

The numbers in rows of the triangle are along a "third layer" skew diagonals pointing top-left in center-justified triangle given in A013610 ((1+3*x)^n) and along a "third layer" skew diagonals pointing top-right in center-justified triangle given in A027465 ((3+x)^n), see links. (Note: First layer of skew diagonals in center-justified triangles of coefficients in expansions of (1+3*x)^n and (3+x)^n are given in A304236 and A304249 respectively.)
The coefficients in the expansion of 1/(1-3*x-x^4) are given by the sequence generated by the row sums.
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 3.035744112294..., when n approaches infinity.

Examples

			Triangle begins:
          1;
          3;
          9;
         27;
         81,        1;
        243,        6;
        729,       27;
       2187,      108;
       6561,      405,       1;
      19683,     1458,       9;
      59049,     5103,      54;
     177147,    17496,     270;
     531441,    59049,    1215,     1;
    1594323,   196830,    5103,    12;
    4782969,   649539,   20412,    90;
   14348907,  2125764,   78732,   540;
   43046721,  6908733,  295245,  2835,   1;
  129140163, 22320522, 1082565, 13608,  15;
  387420489, 71744535, 3897234, 61236, 135;
  ...
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3.

Crossrefs

Row sums give A052917.
Cf. A000244 (column 0), A027471 (column 1), A027472 (column 2), A036216 (column 3).
Sequences of the form 3^(n-q*k)*binomial(n-(q-1)*k, k): A027465 (q=1), A304249 (q=2), A317497 (q=3), this sequence (q=4).

Programs

  • Magma
    [3^(n-4*k)*Binomial(n-3*k,k): k in [0..Floor(n/4)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k] = 3^(n-4k)*(n-3k)!/((n-4k)! k!); Table[T[n, k], {n, 0, 17}, {k, 0, Floor[n/4]} ]//Flatten
    T[0, 0] = 1; T[n_, k_]:= T[n, k] = If[n<0 || k<0, 0, 3T[n-1, k] + T[n-4, k-1]]; Table[T[n, k], {n, 0, 17}, {k, 0, Floor[n/4]}]//Flatten
  • Sage
    flatten([[3^(n-4*k)*binomial(n-3*k,k) for k in (0..n//4)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = 3^(n-4*k) * (n-3*k)!/(k! * (n-4*k)!) where n >= 0 and 0 <= k <= floor(n/4).
Showing 1-5 of 5 results.