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

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

A172369 Triangle read by rows: T(n,k,q) = round(c(n)/(c(k)*c(n-k))) where c are partial products of a sequence defined in comments.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 7, 28, 28, 28, 7, 1, 1, 10, 70, 280, 280, 70, 10, 1, 1, 13, 130, 910, 3640, 910, 130, 13, 1, 1, 25, 325, 3250, 22750, 22750, 3250, 325, 25, 1, 1, 46, 1150, 14950, 149500, 261625, 149500, 14950, 1150, 46, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 01 2010

Keywords

Comments

Start from A143454 and its partial products c(n) = 1, 1, 1, 1, 1, 4, 28, 280, 3640, 91000, 4186000, ... . Then T(n,k) = round(c(n)/(c(k)*c(n-k))).

Examples

			Triangle begins as:
  1;
  1,  1;
  1,  1,    1;
  1,  1,    1,     1;
  1,  1,    1,     1,      1;
  1,  4,    4,     4,      4,      1;
  1,  7,   28,    28,     28,      7,      1;
  1, 10,   70,   280,    280,     70,     10,     1;
  1, 13,  130,   910,   3640,    910,    130,    13,    1;
  1, 25,  325,  3250,  22750,  22750,   3250,   325,   25,  1;
  1, 46, 1150, 14950, 149500, 261625, 149500, 14950, 1150, 46, 1;
		

Crossrefs

Cf. A172363 (q=1), A172368 (q=2), this sequence (q=3), A318774.

Programs

  • Mathematica
    f[n_, q_]:= f[n, q]= If[n==0, 0, If[n<4, 1, f[n-1, q] +q*f[n-4, q]]];
    c[n_, q_]:= Product[f[j, q], {j,n}];
    T[n_, k_, q_]:= Round[c[n, q]/(c[k, q]*c[n - k, q])];
    Table[T[n, k, 3], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, May 08 2021 *)
  • Sage
    @CachedFunction
    def f(n,q): return 0 if (n==0) else 1 if (n<4) else f(n-1, q) + q*f(n-4, q)
    def c(n,q): return product( f(j,q) for j in (1..n) )
    def T(n,k,q): return round(c(n, q)/(c(k, q)*c(n-k, q)))
    flatten([[T(n,k,3) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 08 2021

Formula

T(n, k, q) = round( c(n,q)/(c(k,q)*c(n-k,q)) ), where c(n, q) = Product_{j=1..n} f(j, q), f(n, q) = f(n-1, q) + q*f(n-4, q), f(0, q) = 0, f(1, q) = f(2, q) = f(3, q) = 1, and q = 3. - G. C. Greubel, May 08 2021

Extensions

Definition corrected to give integral terms, G. C. Greubel, May 08 2021
Showing 1-2 of 2 results.