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.

A238883 Array: row n gives number of times each upper triangular partition U(p) occurs as p ranges through the partitions of n.

Original entry on oeis.org

1, 2, 3, 4, 1, 4, 3, 8, 1, 2, 10, 3, 2, 14, 5, 2, 1, 20, 3, 4, 2, 1, 30, 3, 2, 1, 6, 36, 13, 2, 3, 2, 52, 10, 4, 6, 3, 2, 70, 9, 9, 4, 6, 3, 94, 16, 6, 5, 10, 2, 2, 122, 24, 4, 8, 1, 12, 2, 2, 1, 160, 33, 4, 12, 6, 4, 9, 2, 1, 206, 37, 18, 14, 6, 2, 6, 8
Offset: 1

Views

Author

Clark Kimberling, Mar 06 2014

Keywords

Comments

Suppose that p is a partition. Let u, v, w be the number of 1's above, on, and below the principal antidiagonal, respectively, of the Ferrers matrix of p defined at A237981. The upper triangular partition of p, denoted by U(p), is {u,v} if w = 0 and {u,v,w} otherwise. In row n, the counted partitions are taken in Mathematica order (i.e., reverse lexicographic). A000041 = sum of numbers in row n, and A238884(n) = (number of numbers in row n) = number of upper triangular partitions of n.

Examples

			First 12 rows:
1
2
3
4 .. 1
4 .. 3
8 .. 1 .. 2
10 . 3 .. 2
14 . 5 .. 2 .. 1
20 . 3 .. 4 .. 2 .. 1
30 . 3 .. 2 .. 1 .. 6
36 . 13 . 2 .. 3 .. 2
52 . 10 . 4 .. 6 .. 3 .. 2
Row 6 arises as follows:  there are 3 upper triangular (UT) partitions:  51, 33, 321, of which 51 is produced from the 8 partitions  6, 51, 42, 411, 3111, 2211, 21111, and 111111, while the UT partition 33 is produced from the single partition 321, and the only other UT partition of 6, namely 321, is produced from the partitions 33 and 222.  (For example, the rows of the Ferrers matrix of 222 are (1,1,0), (1,1,0), (1,1,0), with principal antidiagonal (0,1,1), so that u = 3, v = 2, w = 1.)
		

Crossrefs

Programs

  • Mathematica
    ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; ut[list_] := Select[Map[Total[Flatten[#]] &, {LowerTriangularize[#, -1], Diagonal[#], UpperTriangularize[#, 1]}] &[Reverse[ferrersMatrix[list]]], # > 0 &];
    t[n_] := #[[Reverse[Ordering[PadRight[Map[First[#] &, #]]]]]] &[  Tally[Map[Reverse[Sort[#]] &, Map[ut, IntegerPartitions[n]]]]]
    u[n_] := Table[t[n][[k]][[1]], {k, 1, Length[t[n]]}]; v[n_] := Table[t[n][[k]][[2]], {k, 1, Length[t[n]]}]; TableForm[Table[t[n], {n, 1, 12}]]
    z = 20; Table[Flatten[u[n]], {n, 1, z}]
    Flatten[Table[u[n], {n, 1, z}]]
    Table[v[n], {n, 1, z}]
    Flatten[Table[v[n], {n, 1, z}]] (* A238883 *)
    Table[Length[v[n]], {n, 1, z}]  (* A238884 *)
    (* Peter J. C. Moses, Mar 04 2014 *)

A238886 Number of lower triangular partitions of n.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 8, 9, 11, 12, 14, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 38, 40, 43, 45, 48, 50, 53, 55, 58, 60, 63, 66, 69, 72, 75, 78
Offset: 1

Views

Author

Clark Kimberling, Mar 06 2014

Keywords

Comments

Suppose that p is a partition. Let u, v, w be the number of 1's above, on, and below the principal diagonal, respectively, of the Ferrers matrix of p defined at A237981. The lower triangular partition of p, denoted by L(p), is {u,v} if w = 0 and {u,v,w} otherwise. In row n, the counted partitions are taken in Mathematica order (i.e., reverse lexicographic). a(n) = number of numbers in row n of the array at A238885.

Examples

			First 12 rows of A238885:
1
2
2 .. 1
2 .. 3
2 .. 2 .. 3
2 .. 2 .. 6 .. 1
2 .. 2 .. 6 .. 1 .. 4
2 .. 2 .. 8 .. 2 .. 4 .. 4
2 .. 2 .. 8 .. 2 .. 6 .. 1 .. 8 .. 1
2 .. 2 .. 10 . 2 .. 6 .. 2 .. 12 . 4 .. 2
2 .. 2 .. 10 . 2 .. 8 .. 2 .. 12 . 1 .. 12 . 4 .. 1
2 .. 2 .. 12 . 2 .. 8 .. 2 .. 16 . 2 .. 12 . 6 .. 9 .. 4
Row 4 arises as follows:  there are 3 lower triangular (LT) partitions:  41, 311, 221, of which 41 is produced from these 2 partitions: 5 and 11111; while the LT partition 311 is produced by 41 and 2111, and the LT partition 221 is produced by 32, 311, 221; thus row 5 is 2, 2, 3.  (For example, the rows of the Ferrers matrix of 311 are (1,1,1), (1,0,0), (1,0,0), with principal diagonal (1,0,0), so that u = 2, v = 1, w = 2; as a partition, 212 is identical to 221.)  Since all the partitions of 5 have been used, there can be no other LT partition of 5 than 41, 311, 221.  Therefore, a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; lt[list_] := Select[Map[Total[Flatten[#]] &, {LowerTriangularize[#, -1], Diagonal[#], UpperTriangularize[#, 1]}] &[ferrersMatrix[list]], # > 0 &]; t[n_] := #[[Reverse[Ordering[PadRight[Map[First[#] &, #]]]]]] &[Tally[Map[Reverse[Sort[#]] &, Map[lt, IntegerPartitions[n]]]]]; u[n_] := Table[t[n][[k]][[1]], {k, 1, Length[t[n]]}]; v[n_] := Table[t[n][[k]][[2]], {k, 1, Length[t[n]]}]; TableForm[Table[t[n], {n, 1, 12}]]
    z = 10; Table[Flatten[u[n]], {n, 1, z}]
    Flatten[Table[u[n], {n, 1, z}]]
    Table[v[n], {n, 1, z}]
    Flatten[Table[v[n], {n, 1, z}]]  (* A238885 *)
    Table[Length[v[n]], {n, 1, z}]  (* A238886 *)
    (* Peter J. C. Moses, Mar 04 2014 *)

A238884 Number of upper triangular partitions of n.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 06 2014

Keywords

Comments

Suppose that p is a partition. Let u, v, w be the number of 1's above, on, and below the principal antidiagonal, respectively, of the Ferrers matrix of p defined at A237981. The upper triangular partition of p, denoted by U(p), is {u,v} if w = 0 and {u,v,w} otherwise. In row n, the counted partitions are taken in Mathematica order (i.e., reverse lexicographic). a(n) = number of numbers in row n of the array at A238883.

Examples

			First 12 rows of the array at A238883:
1
2
3
4 .. 1
4 .. 3
8 .. 1 .. 2
10 . 3 .. 2
14 . 5 .. 2 .. 1
20 . 3 .. 4 .. 2 .. 1
30 . 3 .. 2 .. 1 .. 6
36 . 13 . 2 .. 3 .. 2
52 . 10 . 4 .. 6 .. 3 .. 2
Row 6 arises as follows:  there are 3 upper triangular (UT) partitions:  51, 33, 321, of which 51 is produced from these 8 partitions:  6, 51, 42, 411, 3111, 2211, 21111, 111111; while the UT partition 33 is produced from the single partition 321, and the only other UT partition of 6, namely 321, is produced from the partitions 33 and 222.  (For example, the rows of the Ferrers matrix of 222 are (1,1,0), (1,1,0), (1,1,0), with principal antidiagonal (0,1,1), so that u = 3, v = 2, w = 1.)  Since all the partitions of 6 have been used, there can be no other UT partition of 6 than 51, 33, 321.  Therefore, a(6) = 3.
		

Crossrefs

Programs

  • Mathematica
    ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; ut[list_] := Select[Map[Total[Flatten[#]] &, {LowerTriangularize[#, -1], Diagonal[#], UpperTriangularize[#, 1]}] &[Reverse[ferrersMatrix[list]]], # > 0 &];
    t[n_] := #[[Reverse[Ordering[PadRight[Map[First[#] &, #]]]]]] &[  Tally[Map[Reverse[Sort[#]] &, Map[ut, IntegerPartitions[n]]]]]
    u[n_] := Table[t[n][[k]][[1]], {k, 1, Length[t[n]]}]; v[n_] := Table[t[n][[k]][[2]], {k, 1, Length[t[n]]}]; TableForm[Table[t[n], {n, 1, 12}]]
    z = 20; Table[Flatten[u[n]], {n, 1, z}]
    Flatten[Table[u[n], {n, 1, z}]]
    Table[v[n], {n, 1, z}]
    Flatten[Table[v[n], {n, 1, z}]] (* A238883 *)
    Table[Length[v[n]], {n, 1, z}]  (* A238884 *)
    (* Peter J. C. Moses, Mar 04 2014 *)
Showing 1-3 of 3 results.