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.

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

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 *)
Showing 1-3 of 3 results.