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.

A349841 Triangle T(n,k) built by placing all ones on the left edge, [1,0,0,0,0] repeated on the right edge, and filling the body using the Pascal recurrence T(n,k) = T(n-1,k) + T(n-1,k-1).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 4, 6, 4, 1, 1, 1, 5, 10, 10, 5, 2, 0, 1, 6, 15, 20, 15, 7, 2, 0, 1, 7, 21, 35, 35, 22, 9, 2, 0, 1, 8, 28, 56, 70, 57, 31, 11, 2, 0, 1, 9, 36, 84, 126, 127, 88, 42, 13, 2, 1
Offset: 0

Views

Author

Michael A. Allen, Dec 13 2021

Keywords

Comments

This is the m=5 member in the sequence of triangles A007318, A059259, A118923, A349839, A349841 which have all ones on the left side, ones separated by m-1 zeros on the other side, and whose interiors obey Pascal's recurrence.
T(n,k) is the (n,n-k)-th entry of the (1/(1-x^5),x/(1-x)) Riordan array.
For n>0, T(n,n-1) = A002266(n+4).
For n>1, T(n,n-2) = A008732(n-2).
For n>2, T(n,n-3) = A122047(n-1).
Sums of rows give A349842.
Sums of antidiagonals give A349843.

Examples

			Triangle begins:
  1;
  1,   0;
  1,   1,   0;
  1,   2,   1,   0;
  1,   3,   3,   1,   0;
  1,   4,   6,   4,   1,   1;
  1,   5,  10,  10,   5,   2,   0;
  1,   6,  15,  20,  15,   7,   2,   0;
  1,   7,  21,  35,  35,  22,   9,   2,   0;
  1,   8,  28,  56,  70,  57,  31,  11,   2,   0;
  1,   9,  36,  84, 126, 127,  88,  42,  13,   2,   1;
		

Crossrefs

Other members of sequence of triangles: A007318, A059259, A118923, A349839.

Programs

  • Mathematica
    Flatten[Table[CoefficientList[Series[(1 - x*y)/((1 - (x*y)^5)(1 - x - x*y)), {x, 0, 20}, {y, 0, 10}], {x, y}][[n+1,k+1]],{n,0,10},{k,0,n}]]

Formula

G.f.: (1-x*y)/((1-(x*y)^5)(1-x-x*y)) in the sense that T(n,k) is the coefficient of x^n*y^k in the series expansion of the g.f.
T(n,0) = 1.
T(n,n) = delta(n mod 5,0).
T(n,1) = n-1 for n>0.
T(n,2) = (n-1)*(n-2)/2 for n>1.
T(n,3) = (n-1)*(n-2)*(n-3)/6 for n>2.
T(n,4) = (n-1)*(n-2)*(n-3)*(n-4)/24 for n>3.
T(n,5) = C(n-1,5) + 1 for n>4.
T(n,6) = C(n-1,6) + n - 6 for n>5.
For 0 <= k < n, T(n,k) = (n-k)*Sum_{j=0..floor(k/5)} binomial(n-5*j,n-k)/(n-5*j).
The g.f. of the n-th subdiagonal is 1/((1-x^5)(1-x)^n).

A323231 A(n, k) = [x^k] (1/(1-x) + x/(1-x)^n), square array read by descending antidiagonals for n, k >= 0.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 5, 7, 5, 2, 1, 1, 2, 6, 11, 11, 6, 2, 1, 1, 2, 7, 16, 21, 16, 7, 2, 1, 1, 2, 8, 22, 36, 36, 22, 8, 2, 1, 1, 2, 9, 29, 57, 71, 57, 29, 9, 2, 1, 1, 2, 10, 37, 85, 127, 127, 85, 37, 10, 2, 1
Offset: 0

Views

Author

Peter Luschny, Feb 10 2019

Keywords

Examples

			Array starts:
[0] 1, 2,  1,  1,   1,   1,    1,    1,    1,     1,     1, ...
[1] 1, 2,  2,  2,   2,   2,    2,    2,    2,     2,     2, ... A040000
[2] 1, 2,  3,  4,   5,   6,    7,    8,    9,    10,    11, ... A000027
[3] 1, 2,  4,  7,  11,  16,   22,   29,   37,    46,    56, ... A000124
[4] 1, 2,  5, 11,  21,  36,   57,   85,  121,   166,   221, ... A050407
[5] 1, 2,  6, 16,  36,  71,  127,  211,  331,   496,   716, ... A145126
[6] 1, 2,  7, 22,  57, 127,  253,  463,  793,  1288,  2003, ... A323228
[7] 1, 2,  8, 29,  85, 211,  463,  925, 1717,  3004,  5006, ...
[8] 1, 2,  9, 37, 121, 331,  793, 1717, 3433,  6436, 11441, ...
[9] 1, 2, 10, 46, 166, 496, 1288, 3004, 6436, 12871, 24311, ...
.
Read as a triangle (by descending antidiagonals):
                                     1
                                  2,   1
                                1,   2,   1
                             1,   2,   2,   1
                           1,   2,   3,   2,   1
                        1,   2,   4,   4,   2,   1
                      1,   2,   5,   7,   5,   2,  1
                    1,  2,   6,  11,  11,   6,   2,  1
                  1,  2,   7,  16,  21,  16,   7,  2,  1
                1,  2,  8,  22,  36,  36,  22,   8,  2,  1
              1,  2,  9,  29,  57,  71,  57,  29,  9,  2,  1
.
A(0, 1) = C(-1, 0) + 1 = 2 because C(-1, 0) = 1. A(1, 0) = C(-1, -1) + 1 = 1 because C(-1, -1) = 0. Warning: Some computer algebra programs (for example Maple and Mathematica) return C(n, n) = 1 for n < 0. This contradicts the definition given by Graham et al. (see reference). On the other hand this definition preserves symmetry.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 154.

Crossrefs

Differs from A323211 only in the second term.
Diagonals A(n, n+d): A323230 (d=0), A260878 (d=1), A323229 (d=2).
Antidiagonal sums are A323227(n) if n!=1.
Cf. A007318 (Pascal's triangle).

Programs

  • Julia
    using AbstractAlgebra
    function Arow(n, len)
        R, x = PowerSeriesRing(ZZ, len+2, "x")
        gf = inv(1-x) + divexact(x, (1-x)^n)
        [coeff(gf, k) for k in 0:len-1] end
    for n in 0:9 println(Arow(n, 11)) end
  • Maple
    Binomial := (n, k) -> `if`(n < 0 and n = k, 0, binomial(n,k)):
    A := (n, k) -> Binomial(n + k - 2, k - 1) + 1:
    seq(lprint(seq(A(n, k), k=0..10)), n=0..10);
  • Mathematica
    T[n_, k_]:= If[k==0, 1 + Boole[n==1], If[k==n, 1, Binomial[n-2, k-1] + 1]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 27 2021 *)
  • Sage
    def Arow(n):
        R. = PowerSeriesRing(ZZ, 20)
        gf = 1/(1-x) + x/(1-x)^n
        return gf.padded_list(10)
    for n in (0..9): print(Arow(n))
    

Formula

A(n, k) = binomial(n + k - 2, k - 1) + 1. Note that binomial(n, n) = 0 if n < 0.
A(n, k) = A(k, n) with the exception A(1,0) != A(0,1).
A(n, n) = binomial(2*n-2, n-1) + 1 = A323230(n).
From G. C. Greubel, Dec 27 2021: (Start)
T(n, k) = binomial(n-2, k-1) + 1 with T(n, 0) = 1 + [n=1], T(n, n) = 1.
T(2*n, n) = A323230(n).
Sum_{k=0..n} T(n,k) = n + 1 + 2^(n-2) - [n=0]/4 + [n=1]/2. (End)
Showing 1-2 of 2 results.