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-3 of 3 results.

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

Original entry on oeis.org

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

Views

Author

Zagros Lalo, May 08 2018

Keywords

Comments

The numbers in rows of the triangle are along skew diagonals pointing top-left in center-justified triangle given in A013610 ((1+3*x)^n), cf. formula.
The coefficients in the expansion of 1/(1-3x-x^2) are given by the sequence generated by the row sums.
The sequence of the row sums are the "Bronze Fibonacci numbers" A006190, and the limit of their ratio is 3.30277563773... (Bronze ratio), see A098316.

Examples

			Triangle begins:
          1;
          3;
          9,         1;
         27,         6;
         81,        27,         1;
        243,       108,         9;
        729,       405,        54,        1;
       2187,      1458,       270,       12;
       6561,      5103,      1215,       90,        1;
      19683,     17496,      5103,      540,       15;
      59049,     59049,     20412,     2835,      135,       1;
     177147,    196830,     78732,    13608,      945,      18;
     531441,    649539,    295245,    61236,     5670,     189,      1;
    1594323,   2125764,   1082565,   262440,    30618,    1512,     21;
    4782969,   6908733,   3897234,  1082565,   153090,   10206,    252,    1;
   14348907,  22320522,  13817466,  4330260,   721710,   61236,   2268,   24;
   43046721,  71744535,  48361131, 16888014,  3247695,  336798,  17010,  324,  1;
  129140163, 229582512, 167403915, 64481508, 14073345, 1732104, 112266, 3240, 27;
		

References

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

Crossrefs

Row sums give A006190.
Sequences of the form 3^(n-q*k)*binomial(n-(q-1)*k, k): A027465 (q=1), this sequence (q=2), A317497 (q=3), A318773 (q=4).

Programs

  • Magma
    [3^(n-2*k)*Binomial(n-k,k): k in [0..Floor(n/2)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[0, 0] = 1; T[n_, k_]:= If[n<0 || k<0, 0, 3T[n-1, k] + T[n-2, k-1]];
    Table[t[n, k], {n, 0, 12}, {k, 0, Floor[n/2]}]//Flatten
    With[{q=2}, Table[3^(n-q*k)*Binomial[n-(q-1)*k, k], {n,0,24}, {k,0,Floor[n/q]}] ]//Flatten (* G. C. Greubel, May 12 2021 *)
  • PARI
    T(n,k)=if( n>0 && k>0, 3*T(n-1, k) + T(n-2, k-1), !n && !k)
    tabf(nn) = for (n=0, nn, for (k=0, n\2, print1(T(n,k), ", ")); print); \\ Michel Marcus, May 10 2018
    
  • Sage
    flatten([[3^(n-2*k)*binomial(n-k,k) for k in (0..n//2)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = A013610(n-k, n-2k). - M. F. Hasler, Jun 01 2018

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).

A318774 Coefficients in expansion of 1/(1 - x - 3*x^4).

Original entry on oeis.org

1, 1, 1, 1, 4, 7, 10, 13, 25, 46, 76, 115, 190, 328, 556, 901, 1471, 2455, 4123, 6826, 11239, 18604, 30973, 51451, 85168, 140980, 233899, 388252, 643756, 1066696, 1768393, 2933149, 4864417, 8064505, 13369684, 22169131, 36762382, 60955897, 101064949, 167572342, 277859488, 460727179, 763922026, 1266639052
Offset: 0

Views

Author

Zagros Lalo, Sep 04 2018

Keywords

Comments

The coefficients in the expansion of 1/(1 - x - 3*x^4) are given by the sequence generated by the row sums in triangle A318772.
Coefficients in expansion of 1/(1 - x - 3*x^4) are given by the sum of numbers along "third Layer" skew diagonals pointing top-right in triangle A013610 ((1+3x)^n) and by the sum of numbers along "third Layer" skew diagonals pointing top-left in triangle A027465 ((3+x)^n), see links.

References

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

Crossrefs

Essentially a duplicate of A143454.

Programs

  • Magma
    [n le 4 select 1 else Self(n-1) +3*Self(n-4): n in [1..51]]; // G. C. Greubel, May 08 2021
    
  • Mathematica
    CoefficientList[Series[1/(1-x-3x^4), {x, 0, 50}], x]
    a[n_]:= a[n]= If[n<4, 1, a[n-1] + 3*a[n-4]]; Table[a[n], {n,0,50}]
    LinearRecurrence[{1,0,0,3}, {1,1,1,1}, 51]
  • PARI
    my(p=Mod('x,x^4-'x^3-3)); a(n) = vecsum(Vec(lift(p^n))); \\ Kevin Ryde, May 11 2021
  • Sage
    def a(n): return 1 if (n<4) else a(n-1) + 3*a(n-4)
    [a(n) for n in (0..50)] # G. C. Greubel, May 08 2021
    

Formula

a(n) = a(n-1) + 3*a(n-4) for n >= 0, a(n)=0 for n < 0, with a(0) = a(1) = a(2) = a(3) = 1.
Showing 1-3 of 3 results.