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

A238004 Limiting row of the array at A238325.

Original entry on oeis.org

2, 2, 4, 4, 2, 4, 6, 4, 4, 6, 4, 4, 12, 2, 4, 4, 8, 6, 8, 4, 4, 8, 12, 4, 12, 4, 4, 8, 8, 4, 6, 18, 8, 4, 4, 8, 8, 4, 12, 12, 6, 24, 2, 4, 4, 8, 8, 4, 8, 12, 6, 12, 12, 24, 10, 4, 4, 8, 8, 4, 8, 12, 12, 8, 12, 6, 36, 4, 8, 20, 4, 4, 8, 8, 4, 8, 12, 8, 8, 12
Offset: 0

Views

Author

Keywords

Comments

For fixed m >= 2 and sufficiently large k, the first m+1 antidiagonal partitions of k, listed in reverse Mathematica order, are as follows: p(0) = [1,1,...,1] (k 1's), p(1) = [2,1,...,1] (k-2 1's), p(2) = [2,2,1,...,1] (k-4 1's), ..., p[m] = [2,...,2,1,...,1] (m 2's and k-2m 1's). The number of occurrences of p(n) among all the partitions of k (for sufficiently large k), is a(n); see Example.

Examples

			Referring to the antidiagonal partitions p(i) in Comments, p(0) occurs 2 times for all k >=2; p(1) occurs 2 times for all k >=5; p(2) occurs 4 times for all k >= 7; p(3) occurs 4 times for all k >= 9; etc., so that A238004 begins with 2, 2, 4, 4.
		

Crossrefs

Cf. A238325.

Programs

  • Mathematica
    ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; antiDiagPartNE[list_] := Module[{m = ferrersMatrix[list]},    Map[Diagonal[Reverse[m], #] &, Range[-#, #] &[Length[m] - 1]]]; a[n_] := Last[Transpose[Tally[Map[DeleteCases[Reverse[Sort[Map[Count[#, 1] &, antiDiagPartNE[#]]]], 0] &, IntegerPartitions[n]]]]]
    Take[a[40], 100] (* Peter J. C. Moses, Feb 18 2014 *)

A237981 Array: row n gives the NW partitions of n; see Comments.

Original entry on oeis.org

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

Views

Author

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 here as the Ferrers matrix of p, denoted by f(p). Four kinds of partitions are defined from f(p); they will be described by referring to the example of a 3 X 3 matrix, as follows:
...
a .. b .. c
d .. e .. f
g .. h .. i
...
Writing summands in clockwise order, the four directional partitions of p are by
NW(p) = [g + d + a + b + c, h + e + f, i]
NE(p) = [a + b + c + f + i, d + e + h, g]
SE(p) = [c + f + i + h + g, b + e + d, a]
SW(p) = [i + h + g + d + a, f + e + b, c].
The order in which the parts appear does not change the partition, but it is common to list them in nondecreasing order, as in Example 1.
...
Note that "Ferrers matrix" can be defined without reference to Ferrers graphs, 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. The number of Ferrers matrices of order m is given by A051924.
The number of NW partitions of n is A003114(n) for n >=1. - Clark Kimberling, Mar 20 2014

Examples

			Example 1.  Let p = {6,3,3,3,1), a partition of 16.  Then NW(p) = [10, 4, 2], NE(p) = [6,3,3,3,1], SE(p) = [5, 4, 3, 2, 1, 1], SW(p) = [5,4,4,1,1,1].
...
Example 2.
The first 9 rows of the array of NW partitions:
1
2
3
4 .. 3 .. 1
5 .. 4 .. 1
6 .. 5 .. 1 .. 4 .. 2
7 .. 6 .. 1 .. 5 .. 2
8 .. 7 .. 1 .. 6 .. 2 .. 5 .. 3
9 .. 8 .. 1 .. 7 .. 2 .. 6 .. 3 .. 5 .. 3 .. 1
Row 9, for example, represents the 5 NW partitions of 9 as follows:  [9], [8,1], [7,2], [6,3], [5,3,1], listed in "Mathematica order".
		

Crossrefs

Programs

  • Mathematica
    z = 10; 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 corner: A237981*)
    Flatten[Map[cP[[#, 2]] &, Range[Length[cP]]]](*NE corner: A237982*)
    Flatten[Map[cP[[#, 3]] &, Range[Length[cP]]]](*SE corner: A237983*)
    Flatten[Map[cP[[#, 4]] &, Range[Length[cP]]]](*SW corner: A237982*)
    (* Peter J. C. Moses, Feb 25 2014 *)

A237982 Triangular array read by rows: row n gives the NE partitions of n (see Comments).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

See Comments at A237981 for definitions of the directional partitions, NW, NE, SW, SE. The number of NE partitions of n, and also the number of SW partitions of n, is A237329(n), for n >=1.
The order is: each partition has nonincreasing parts and the partitions are ordered anti-lexicographic (called "Mathematica order" in the example). - Wolfdieter Lang, Mar 21 2014

Examples

			The first 4 rows of the array of NW partitions:
1
2 .. 1 .. 1
3 .. 2 .. 1 .. 1 .. 1 .. 1
4 .. 3 .. 1 .. 2 .. 1 .. 1 .. 1 .. 1 .. 1 .. 1
Row 4, for example, represents the 4 NE partitions of 4 as follows:  [4], [3,1], [2,1,1], [1,1,1,1], listed in "Mathematica order".
		

Crossrefs

Programs

  • Mathematica
    z = 10; 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 corner: A237981*)
    Flatten[Map[cP[[#, 2]] &, Range[Length[cP]]]](*NE corner: A237982*)
    Flatten[Map[cP[[#, 3]] &, Range[Length[cP]]]](*SE corner: A237983*)
    Flatten[Map[cP[[#, 4]] &, Range[Length[cP]]]](*SW corner: A237982*)
    (* Peter J. C. Moses, Feb 25 2014 *)

A237985 Array: row n shows the square partitions of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 1, 6, 5, 1, 7, 6, 1, 5, 2, 8, 7, 1, 6, 2, 9, 8, 1, 7, 2, 6, 3, 10, 9, 1, 8, 2, 7, 3, 6, 4, 11, 10, 1, 9, 2, 8, 3, 7, 4, 7, 3, 1, 12, 11, 1, 10, 2, 9, 3, 8, 4, 8, 3, 1, 7, 4, 1, 13, 12, 1, 11, 2, 10, 3, 9, 4, 9, 3, 1, 8, 5, 8, 4, 1, 7, 5, 1
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,4], [8,3,1], [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. The first 9 rows of the array:
1
2
3
4
5 4 1
6 5 1
7 6 1 5 2
8 7 1 6 2
9 8 1 7 2 6 3
		

Crossrefs

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

A238326 Array: row n gives the number of occurrences of each possible diagonal partition of n, arranged in reverse Mathematica order.

Original entry on oeis.org

1, 2, 3, 4, 1, 5, 2, 6, 3, 2, 7, 4, 4, 8, 5, 6, 3, 9, 6, 8, 6, 1, 10, 7, 10, 9, 4, 2, 11, 8, 12, 12, 8, 3, 2, 12, 9, 14, 15, 12, 5, 4, 4, 2, 13, 10, 16, 18, 16, 10, 5, 6, 3, 4, 14, 11, 18, 21, 20, 15, 6, 6, 8, 6, 6, 4, 15, 12, 20, 24, 24, 20, 7, 12, 10, 9, 8
Offset: 1

Views

Author

Keywords

Comments

Suppose that p is a partition of n, let F(p) be its Ferrers matrix, as defined at A237981, and let mXm be the size of F(p). The numbers of 1s in each of the 2m-1 diagonals of F(p) form a partition of n. Any partition which is associated with a partition of n in this manner is introduced here as a diagonal partition of n. A000041(n) = sum of the numbers in row n; A003114(n) = number of terms in row n. Every diagonal partition is an antidiagonal partition, as in A238325 (but not conversely).

Examples

			The Mathematica ordering of the 3 antidiagonal partitions of 6 follows: 2211, 21111, 111111. Frequencies of these among the 11 partitions of 6 are given in reverse Mathematica ordering as follows: 111111 occurs 6 times, 21111 occurs 3 times, and 2211 occurs 2 times, so that row 6 of the array is 6 3 2.
...
First 9 rows:
  1
  2
  3
  4 1
  5 2
  6 3 2
  7 4 4
  8 5 6 3
  9 6 8 6 1
		

Crossrefs

Programs

  • Mathematica
    z = 20; ferrersMatrix[list_] := PadRight[Map[Table[1, {#}] &, #], {#, #} &[Max[#, Length[#]]]] &[list]; diagPartSE[list_] := Module[{m = ferrersMatrix[list]}, Map[Diagonal[m, #] &, Range[-#, #] &[Length[m] - 1]]]; Tally[Map[  DeleteCases[Reverse[Sort[Map[Count[#, 1] &, diagPartSE[#]]]], 0] &, IntegerPartitions[z]]]; a1[n_] := Last[Transpose[Tally[Map[DeleteCases[Reverse[Sort[Map[Count[#, 1] &, diagPartSE[#]]]], 0] &, IntegerPartitions[n]]]]]; t = Table[a1[n], {n, 1, z}]; u = Flatten[t]
    Map[Last[Transpose[Tally[Map[DeleteCases[Reverse[Sort[Map[Count[#, 1] &, diagPartSE[#]]]], 0] &, IntegerPartitions[#]]]]] &, Range[z]] // TableForm
    (* Peter J. C. Moses, Feb 25 2014 *)

A237983 Triangular array read by rows: row n gives the SE partitions of n; see Comments.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 2, 1, 1, 3, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

See Comments at A237981 for definitions of the directional partitions, NW, NE, SW, SE. The number of SE partitions of n is A122129(n) for n >=1.

Examples

			The first 4 rows of the array of SE partitions:
1
1 .. 1
2 .. 1 .. 1 .. 1 .. 1
3 .. 1 .. 2 .. 1 .. 1 .. 1 .. 1 .. 1 .. 1
Row 4, for example, represents the 4 NE partitions of 4 as follows:  [3,1], [2,1,1], [1,1,1,1], listed in "Mathematica order".
		

Crossrefs

Programs

  • Mathematica
    z = 10; 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 corner: A237981*)
    Flatten[Map[cP[[#, 2]] &, Range[Length[cP]]]](*NE corner: A237982*)
    Flatten[Map[cP[[#, 3]] &, Range[Length[cP]]]](*SE corner: A237983*)
    Flatten[Map[cP[[#, 4]] &, Range[Length[cP]]]](*SW corner: A237982*)
    (* Peter J. C. Moses, Feb 25 2014 *)
Showing 1-6 of 6 results.