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.

A144385 Triangle read by rows: T(n,k) is the number of partitions of [1, 2, ..., k] into exactly n blocks, each of size 1, 2 or 3 (n >= 0, 0 <= k <= 3n).

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 0, 1, 3, 7, 10, 10, 0, 0, 0, 1, 6, 25, 75, 175, 280, 280, 0, 0, 0, 0, 1, 10, 65, 315, 1225, 3780, 9100, 15400, 15400, 0, 0, 0, 0, 0, 1, 15, 140, 980, 5565, 26145, 102025, 323400, 800800, 1401400, 1401400, 0, 0, 0, 0, 0, 0, 1, 21, 266, 2520, 19425, 125895, 695695, 3273270, 12962950, 42042000, 106506400, 190590400, 190590400
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Dec 07 2008, Dec 17 2008

Keywords

Comments

Row n has 3n+1 entries.

Examples

			Triangle begins:
[1]
[0, 1, 1, 1]
[0, 0, 1, 3, 7, 10, 10]
[0, 0, 0, 1, 6, 25, 75, 175, 280, 280]
[0, 0, 0, 0, 1, 10, 65, 315, 1225, 3780, 9100, 15400, 15400]
[0, 0, 0, 0, 0, 1, 15, 140, 980, 5565, 26145, 102025, 323400, 800800, 1401400, 1401400]
		

Crossrefs

See A144399, A144402, A144417, A111246 for other versions of this triangle.
Column sums give A001680, row sums give A144416. Taking last nonzero entry in each row gives A025035.
Diagonals include A000217, A001296, A027778, A144516; also A025035.
A generalization of the triangle in A144331 (and in several other entries).
Cf. A144643.

Programs

  • Maple
    T := proc(n, k)
    option remember;
    if n = k then 1;
    elif k < n then 0;
    elif n < 1 then 0;
    else T(n - 1, k - 1) + (k - 1)*T(n - 1, k - 2) + 1/2*(k - 1)*(k - 2)*T(n - 1, k - 3);
    end if;
    end proc;
    for n from 0 to 12 do lprint([seq(T(n,k),k=0..3*n)]); od:
  • Mathematica
    t[n_, n_] = 1; t[n_ /; n >= 0, k_] /; 0 <= k <= 3*n := t[n, k] = t[n-1, k-1] + (k-1)*t[n-1, k-2] + (1/2)*(k-1)*(k-2)*t[n-1, k-3]; t[, ] = 0; Table[t[n, k], {n, 0, 12}, {k, 0, 3*n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

Formula

T(n, k) = T(n - 1, k - 1) + (k - 1)*T(n - 1, k - 2) + (1/2)*(k - 1)*(k - 2)*T(n - 1, k - 3).
E.g.f.: Sum_{ n >= 0, k >= 0 } T(n, k) y^n x^k / k! = exp( y*(x+x^2/2+x^3/6) ). That is, the coefficient of y^n is the e.g.f. for row n. E.g. the e.g.f. for row 2 is (1/2)*(x+x^2/2+x^3/6)^2 = 1*x^2/2! + 3*x^3/3! + 7*x^4/4! + 10*x^5/5! + 10*x^6/6!.

A144000 Rectangular array by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark squares for which x + y == 0 (mod 3); then R(m,n) is the number of marked squares in the rectangle [0,m]x[0,n].

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 3, 5, 6, 5, 3, 4, 6, 8, 8, 6, 4, 5, 8, 10, 11, 10, 8, 5, 5, 9, 12, 13, 13, 12, 9, 5, 6, 10, 14, 16, 16, 16, 14, 10, 6, 7, 12, 16, 19, 20, 20, 19, 16, 12, 7, 7, 13, 18, 21, 23, 24, 23, 21, 18, 13, 7, 8, 14, 20, 24, 26, 28, 28, 26, 24, 20, 14, 8, 9, 16, 22, 27, 30
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2008

Keywords

Comments

Row 3n is given by 2n*(1,2,3,4,5,6,...).

Crossrefs

Programs

  • Maple
    A := proc(n,k) ## n = 0 .. infinity and k = 0 .. n
        if  1 = (n-k+1) mod 3 then
            floor((2*(k+1)*(n-k+1)+1) / 3)
        else
            floor((2*(k+1)*(n-k+1)) / 3)
        end if
    end proc: # Yu-Sheng Chang, Jan 01 2020
  • Mathematica
    b[n_, m_] := If[Mod[n, 3] == 1, Floor[(2*m*n + 1)/3],  Floor[2*m*n/3]]; a:= Table[a[n, m], {n, 1, 25}, {m, 1, 25}]; Table[a[[k, n - k + 1]], {n, 1, 20}, {k, 1, n}]//Flatten (* G. C. Greubel, Dec 05 2017 *)

Formula

R(m,n) = floor((2*m*n + 1)/3) if n == 1 (mod 3) and floor(2*m*n/3) otherwise.

A144001 Rectangular array read by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark squares for which x + y == 0 (mod 3); then R(m,n) is the number of unmarked squares in the rectangle [0,m] X [0,n].

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 3, 3, 3, 2, 2, 4, 4, 4, 4, 2, 2, 4, 5, 5, 5, 4, 2, 3, 5, 6, 7, 7, 6, 5, 3, 3, 6, 7, 8, 9, 8, 7, 6, 3, 3, 6, 8, 9, 10, 10, 9, 8, 6, 3, 4, 7, 9, 11, 12, 12, 12, 11, 9, 7, 4, 4, 8, 10, 12, 14, 14, 14, 14, 12, 10, 8, 4, 4, 8, 11, 13, 15, 16, 16, 16, 15, 13, 11, 8, 4, 5, 9
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2008

Keywords

Comments

Row 3n is given by n*(1,2,3,4,5,6,...).

Crossrefs

Programs

  • Maple
    A[oid] := proc(n,k) ## n = 0 .. infinity and k = 0 .. n
        if 1 = (n-k+1) mod 3 then
            (n-k+1)*(k+1) - floor((2*(n-k+1)*(k+1) + 1)/3)
        else
            (n-k+1)*(k+1) - floor(2*(n-k+1)*(k+1)/3)
        end if
    end proc: # Yu-Sheng Chang, Jan 07 2020
  • Mathematica
    b[n_, m_]:= If[Mod[n, 3] == 1, m*n - Floor[(2*m*n + 1)/3], m*n - Floor[2*m*n/3]]; TableForm[Table[b[n, m], {n, 1, 6}, {m, 1, 6}]]
    a:= Table[a[n, m], {n, 1, 25}, {m, 1, 25}]; Table[a[[k, n - k + 1]], {n, 1, 20}, {k, 1, n}]//Flatten (* G. C. Greubel, Dec 05 2017 *)

Formula

R(m,n) = m*n - floor((2*m*n + 1)/3) if n ==1 (mod 3) and m*n - floor(2*m*n/3) otherwise.
Showing 1-3 of 3 results.