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.

Previous Showing 11-17 of 17 results.

A238943 Triangular array read by rows: t(n,k) = size of the Ferrers matrix of p(n,k).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 3, 3, 4, 5, 6, 5, 4, 4, 3, 3, 4, 3, 4, 5, 6, 7, 6, 5, 5, 4, 4, 4, 3, 3, 4, 5, 4, 5, 6, 7, 8, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 5, 3, 4, 4, 5, 6, 4, 5, 6, 7, 8, 9, 8, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 5, 6, 3, 4
Offset: 1

Views

Author

Clark Kimberling, Mar 07 2014

Keywords

Comments

Suppose that p is a partition of n, and let m = max{greatest part of p, number of parts of p}. Write the Ferrers graph of p with 1's as nodes, and pad the graph with 0's to form an m X m square matrix, which is introduced at A237981 as the Ferrers matrix of p, denoted by f(p). The size of f(p) is m.

Examples

			First 8 rows:
  1
  2 2 2
  3 2 3
  4 3 2 3 4
  5 4 3 3 3 4 5
  6 5 4 4 3 3 4 3 4 5 6
  7 6 5 5 4 4 4 3 3 4 5 4 5 6 7
  8 7 6 6 5 5 5 4 4 4 4 5 3 4 4 5 6 4 5 6 7 8
For n = 3, the three partitions are [3], [2,1], [1,1,1]. Their respective Ferrers matrices derive from Ferrers graphs as follows:
The partition [3] has Ferrers graph 1 1 1, with Ferrers matrix of size 3:
  1 1 1
  0 0 0
  0 0 0
The partition [2,1] has Ferrers graph
  11
  1
with Ferrers matrix of size 2:
  1 1
  1 0
The partition [1,1,1] has Ferrers graph
  1
  1
  1
with Ferrers matrix of size 3
  1 0 0
  1 0 0
  1 0 0
Thus row 3 is (3,2,3).
		

Crossrefs

Programs

  • Mathematica
    p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]]; a[t_] := Max[Max[t], Length[t]]; t = Table[a[p[n, k]], {n, 1, 10}, {k, 1, PartitionsP[n]}]
    u = TableForm[t]  (* A238943 array *)
    v = Flatten[t]    (* A238943 sequence *)

Formula

t(n,k) = max{max(p(n,k)), length(p(n,k))}, where p(n,k) is the k-th partition of n in Mathematica order.

A238944 Number of partitions of n that have odd sized Ferrers matrix.

Original entry on oeis.org

0, 2, 1, 3, 2, 6, 7, 13, 14, 23, 26, 40, 47, 69, 85, 119, 145, 198, 242, 320, 391, 507, 620, 794, 968, 1226, 1493, 1869, 2269, 2816, 3408, 4194, 5056, 6178, 7423, 9014, 10793, 13035, 15561, 18700, 22251, 26621
Offset: 1

Views

Author

Clark Kimberling, Mar 07 2014

Keywords

Comments

Also, the number of odd numbers in row n of the array at A238943. Suppose that p is a partition of n, and let m = max{greatest part of p, number of parts of p}. Write the Ferrers graph of p with 1's as nodes, and pad the graph with 0's to form an m X m square matrix, which is introduced at A237981 as the Ferrers matrix of p, denoted by f(p). The size of f(p) is m.

Examples

			(See the example at A238943.)
		

Crossrefs

Programs

  • Mathematica
    p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]]; a[t_] := Max[Max[t], Length[t]]; z = 42; t = Mod[Table[a[p[n, k]], {n, 1, z}, {k, 1, PartitionsP[n]}], 2];
    u = Table[Count[t[[n]], 0], {n, 1, z}]  (* A238944 *)
    v = Table[Count[t[[n]], 1], {n, 1, z}]  (* A238945 *)

Formula

a(n) + A238945(n) = A000041(n).

A238945 Number of partitions of n that have even-sized Ferrers matrix.

Original entry on oeis.org

1, 0, 2, 2, 5, 5, 8, 9, 16, 19, 30, 37, 54, 66, 91, 112, 152, 187, 248, 307, 401, 495, 635, 781, 990, 1210, 1517, 1849, 2296, 2788, 3434, 4155, 5087, 6132, 7460, 8963, 10844, 12980, 15624, 18638, 22332, 26553
Offset: 1

Views

Author

Clark Kimberling, Mar 07 2014

Keywords

Comments

Also, the number of even numbers in row n of the array at A238943. Suppose that p is a partition of n, and let m = max{greatest part of p, number of parts of p}. Write the Ferrers graph of p with 1's as nodes, and pad the graph with 0's to form an m X m square matrix, which is introduced at A237981 as the Ferrers matrix of p, denoted by f(p). The size of f(p) is m.

Examples

			(See the example at A238943.)
		

Crossrefs

Programs

  • Mathematica
    p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]]; a[t_] := Max[Max[t], Length[t]]; z = 42; t = Mod[Table[a[p[n, k]], {n, 1, z}, {k, 1, PartitionsP[n]}], 2];
    u = Table[Count[t[[n]], 0], {n, 1, z}]  (* A238944 *)
    v = Table[Count[t[[n]], 1], {n, 1, z}]  (* A238945 *)

Formula

a(n) + A238944(n) = A000041(n).

A237980 Array: row n gives the number of distinct square partitions of n; see Comments.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 10, 13, 15, 18, 21, 25, 28, 32, 36, 44, 49, 60, 66, 80, 89, 103, 115, 132, 147, 168, 188, 212, 236, 269, 301, 344, 385, 437, 485, 549, 606, 678, 751, 837, 926, 1031, 1133, 1263, 1389, 1541, 1696, 1889, 2068, 2306, 2529
Offset: 1

Views

Author

Keywords

Comments

Suppose that p is a partition of n. Let m X m be the size of its Ferrers matrix, f(p), defined at A237981. Then f(p) consists of ceiling(m/2) concentric squares, where the innermost square is a single point if m is odd. The square partition of p is introduced here as the partition [x(1), x(2), ..., x(k)], where x(i) is the number of 1s in the i-th concentric square, where the squares are taken in order starting with the outermost.

Examples

			The 7 square partitions of 12 are as follows: [12], [11,1], [10,2], [9,3], [8,3,1], [8,4], [7,4,1]. The Ferrers matrix of the partition [4,3,3,1,1] of 12 is shown here:
1 . 1 . 1 . 1 . 0
1 . 1 . 1 . 0 . 0
1 . 1 . 1 . 0 . 0
1 . 0 . 0 . 0 . 0
1 . 0 . 0 . 0 . 0.
The outermost square has 8 1s, the next has 3 1s, and the innermost, 1 1, so that [8,3,1] is a square partition of 12.
		

Crossrefs

Cf. A237985.

Programs

  • Mathematica
    z=20;
    ferrersMatrix[list_]:=PadRight[Map[Table[1,{#}]&,#],{#,#}&[Max[#,Length[#]]]]&[list];
    sqPart[list_]:=DeleteCases[Total[{Total[LowerTriangularize[#]+ Transpose[UpperTriangularize[#,1]]]&[Reverse[LowerTriangularize[#]]],Reverse[Total[Transpose[ LowerTriangularize[#]]+UpperTriangularize[#,1]]]&[Reverse[UpperTriangularize[#,1]]]}&[ferrersMatrix[list]]],0];
    sqParts[n_]:=#[[Reverse[Ordering[PadRight[#]]]]]&[DeleteDuplicates[Map[sqPart,IntegerPartitions[n]]]]
    Flatten[sq=Map[sqParts[#]&,Range[z]]] (*A237985*)
    Map[Length,sq] (*A237980*)
    (* Peter J. C. Moses, Feb 19 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 *)

A238606 Array: t(n,k) = number of partitions p of n such that the principal antidiagonal of the Ferrers matrix of p has k 1's.

Original entry on oeis.org

1, 2, 2, 1, 4, 1, 4, 3, 8, 2, 1, 10, 3, 2, 14, 7, 1, 20, 5, 5, 30, 5, 6, 1, 36, 15, 2, 3, 52, 16, 6, 3, 70, 13, 15, 3, 94, 22, 12, 7, 122, 32, 8, 13, 1, 160, 45, 12, 10, 4, 206, 51, 26, 8, 6, 276, 49, 44, 9, 7, 350, 75, 30, 28, 7, 448, 108, 22, 38, 11, 566
Offset: 1

Views

Author

Clark Kimberling, Mar 01 2014

Keywords

Comments

"Ferrers matrix" is defined (A237981) as follows: an m X m matrix (x(i,j)) of 0's and 1's satisfying three properties: (1) x(1,m) = 1 or x(m,1) = 1; (2) x(i,j+1) >= x(i,j) for j=1..m-1 and i = 1..m; and (3) x(i+1,j) >= x(i,j) for i=1..m-1 and j=1..m. Ferrers matrices arise from Ferrers graphs of partitions, as follows: suppose that p is a partition of n, and let m = max{greatest part of p, number of parts of p}. Write the Ferrers graph of p with 1s as nodes, and pad the graph with 0's to form an m X m square matrix, which is the Ferrers matrix of p.
If "antidiagonal" is changed to "diagonal" in the definition of t(n,k), the resulting array is given by A115995. For both arrays, the sum of terms in row n is A000041(n).

Examples

			First 17 rows:
1
2
2 .... 1
4 .... 1
4 .... 3
8 .... 2 .... 1
10 ... 3 .... 2
14 ... 7 .... 1
20 ... 5 .... 5
30 ... 5 .... 6 ... 1
36 ... 15 ... 2 ... 3
52 ... 16 ... 6 ... 3
70 ... 13 ... 15 .. 3
94 ... 22 ... 12 .. 7
122 ... 32 .. 8 ... 13 .. 1
160 ... 45 .. 12 .. 10 .. 4
Row 5 counts 4 antidiagonals that have exactly one 1 and 3 antidiagonals that have exactly two 1's.  The Ferrers matrix for each of the latter three cases are as shown below.
For the partition 32:
1 1 1
1 1 0
0 0 0  (antidiagonal, from row 1:  1,1,0)
For the partition 311:
1 1 1
1 0 0
1 0 0  (antidiagonal, from row 1:  1,0,1,)
For the partition 221:
1 1 0
1 1 0
1 0 0  (antidiagonal, from row 1:  0,1,1)
		

Crossrefs

Programs

  • Mathematica
    z = 30; ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; diagAntidiagDots[list_] := {Total[Diagonal[#]], Total[Diagonal[Reverse[#]]]} &[ferrersMatrix[list]]; u[n_, k_] := Length[Select[   Map[diagAntidiagDots, IntegerPartitions[n]], #[[2]] == k &]]; t[n_] := t[n] = Floor[(-1 + Sqrt[1 + 8 n])/2]; w = Table[u[n, k], {n, 1, z}, {k, 1, t[n]}]; y = Flatten[w] (* A238606 *) (* Peter J. C. Moses, Mar 01 2014 *)

A239329 The number of NE partitions of n (see Comments).

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 14, 19, 27, 36, 51, 67, 90, 117, 157, 204, 266, 337, 436, 554, 708, 890, 1123, 1401, 1750, 2172, 2701, 3329, 4106, 5026, 6161, 7507, 9147, 11095, 13455, 16245, 19597, 23555, 28288, 33867, 40514, 48328, 57590, 68456, 81286, 96286, 113947
Offset: 1

Views

Author

Clark Kimberling, Mar 19 2014

Keywords

Comments

Directional partitions are defined at A237981, and NE partitions are shown at A237982. a(n) is also the number of SW partitions of n, as at A237982.

Examples

			See A237982.
		

Crossrefs

Programs

  • Mathematica
    z = 9; ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; cornerPart[list_] := Module[{f = ferrersMatrix[list], u, l, ur, lr, nw, ne, se, sw}, {u, l} = {UpperTriangularize[#, 1], LowerTriangularize[#]} &[f]; {ur, lr} = {UpperTriangularize[#, 1], LowerTriangularize[#]} &[Reverse[f]]; {nw, ne, se, sw} = {Total[Transpose[u]] + Total[l], Total[ur] + Total[Transpose[lr]], Total[u] + Total[Transpose[l]], Total[Transpose[ur]] + Total[lr]}; Map[DeleteCases[Reverse[Sort[#]], 0] &, {nw, ne, se, sw}]]; cornerParts[n_] :=  Map[#[[Reverse[Ordering[PadRight[#]]]]] &, Map[DeleteDuplicates[#] &, Transpose[Map[cornerPart, IntegerPartitions[n]]]]]; cP = Map[cornerParts, Range[z]];
    Flatten[Map[cP[[#, 1]] &, Range[Length[cP]]]];(*NW A237981*)
    Flatten[Map[cP[[#, 2]] &, Range[Length[cP]]]];(*NE A237982*)
    Flatten[Map[cP[[#, 3]] &, Range[Length[cP]]]];(*SE A237983*)
    Flatten[Map[cP[[#, 4]] &, Range[Length[cP]]]];(*SW A237982*)
    m1 = Map[cP[[#, 1]] &, Range[Length[cP]]];
    Table[Length[m1[[k]]], {k, 1, z}] (* A003114, NW *)
    m2 = Map[cP[[#, 2]] &, Range[Length[cP]]];
    Table[Length[m2[[k]]], {k, 1, z}] (* A239329, NE *)
    m3 = Map[cP[[#, 3]] &, Range[Length[cP]]];
    Table[Length[m3[[k]]], {k, 1, z}] (* A122129, SE *)
    m4 = Map[cP[[#, 4]] &, Range[Length[cP]]];
    Table[Length[m4[[k]]], {k, 1, z}] (* A239329, SW *)
Previous Showing 11-17 of 17 results.