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

A241151 Number of distinct degrees in the partition graph G(n) defined at A241150.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) = number of numbers in row n of the array at A241150, counting the top row as row 2.
Conjecture: partial sums of A097806. - Sean A. Irvine, Jul 14 2022

Examples

			(See the Example section of A241150.)
		

Crossrefs

Programs

  • Mathematica
        z = 25; spawn[part_] := Map[Reverse[Sort[Flatten[ReplacePart[part, {# - 1, 1}, Position[part, #, 1, 1][[1]][[1]]]]]] &, DeleteCases[DeleteDuplicates[part], 1]];
         unspawn[part_] := If[Length[Cases[part, 1]] > 0, Map[ReplacePart[Most[part], Position[Most[part], #, 1, 1][[1]][[1]] -> # + 1] &, DeleteDuplicates[Most[part]]], {}]; m = Map[Last[Transpose[Tally[Map[#[[2]] &, Tally[Flatten[{Map[unspawn, #], Map[spawn, #]}, 2] &[IntegerPartitions[#]]]]]]] &, 1 + Range[z]];
         Column[m] (* A241150 as an array *)
         Flatten[m] (* A241150 as a sequence *)
         Table[Length[m[[n]]], {n, 1, z}] (* A241151 *)
         Table[Max[m[[n]]], {n, 1, z}] (* A241152 *)
         Table[Last[m[[n]]], {n, 1, z}] (* A241153 *)
         (* Next, show the graph G(k) *)
         k = 8; graph = Flatten[Table[part = IntegerPartitions[k][[n]]; Map[FromDigits[part] -> FromDigits[#] &, spawn[part]], {n, 1, PartitionsP[k]}]]; Graph[graph, VertexLabels -> "Name", ImageSize -> 500, ImagePadding -> 20] (* Peter J. C. Moses, Apr 15 2014 *)

A241152 Maximal number of partitions having the same degree in the partition graph G(n) defined at A241150.

Original entry on oeis.org

2, 2, 3, 3, 4, 6, 8, 10, 13, 17, 22, 32, 43, 57, 77, 94, 119, 144, 178, 209, 274, 364, 465, 597, 746, 935, 1143, 1389, 1674, 2006, 2376, 2803, 3284, 3905, 4853, 6010, 7360, 8988, 10834, 13070, 15565, 18522, 21836, 25713, 30030, 35048, 40575, 46930, 53950
Offset: 2

Views

Author

Keywords

Examples

			a(7) counts these 6 partitions:  61, 52, 43, 331, 322, 2221, which all have degree 2 in G(7), as seen by putting k = 7 in the Mathematica program.
		

Crossrefs

Programs

  • Mathematica
    z = 25; spawn[part_] := Map[Reverse[Sort[Flatten[ReplacePart[part, {# - 1, 1}, Position[part, #, 1, 1][[1]][[1]]]]]] &, DeleteCases[DeleteDuplicates[part], 1]];
         unspawn[part_] := If[Length[Cases[part, 1]] > 0, Map[ReplacePart[Most[part], Position[Most[part], #, 1, 1][[1]][[1]] -> # + 1] &, DeleteDuplicates[Most[part]]], {}]; m = Map[Last[Transpose[Tally[Map[#[[2]] &, Tally[Flatten[{Map[unspawn, #], Map[spawn, #]}, 2] &[IntegerPartitions[#]]]]]]] &, 1 + Range[z]];
         Column[m] (* A241150 as an array *)
         Flatten[m] (* A241150 as a sequence *)
         Table[Length[m[[n]]], {n, 1, z}] (* A241151 *)
         Table[Max[m[[n]]], {n, 1, z}] (* A241152 *)
         Table[Last[m[[n]]], {n, 1, z}] (* A241153 *)
         (* Next, show the graph G(k) *)
         k = 8; graph = Flatten[Table[part = IntegerPartitions[k][[n]]; Map[FromDigits[part] -> FromDigits[#] &, spawn[part]], {n, 1, PartitionsP[k]}]]; Graph[graph, VertexLabels -> "Name", ImageSize -> 500, ImagePadding -> 20] (* Peter J. C. Moses, Apr 15 2014 *)

A241153 Number of partitions having the maximal degree in the partition graph G(n) defined at A241150.

Original entry on oeis.org

2, 1, 1, 2, 1, 1, 2, 5, 1, 1, 2, 5, 10, 1, 1, 2, 5, 10, 20, 1, 1, 2, 5, 10, 20, 36, 1, 1, 2, 5, 10, 20, 36, 65, 1, 1, 2, 5, 10, 20, 36, 65, 110, 1, 1, 2, 5, 10, 20, 36, 65, 110, 185, 1, 1, 2, 5, 10, 20, 36, 65, 110, 185, 300
Offset: 2

Views

Author

Keywords

Comments

a(n) = last number in row n of G(n), for n >= 2. The numbers in this sequence can be formatted as a triangle:
2
1 1 2
1 1 2 5
1 1 2 5 10
1 1 2 5 10 20
1 1 2 5 10 20 36 ...
Deleting column 1 leaves
1 2
1 2 5
1 2 5 10
1 2 5 10 20
1 2 5 10 20 36... ,
in which row n is identical to the first n+1 terms of A000712.

Examples

			a(9) counts these 5 partitions:  5211, 4311, 42111, 321111, 32211, which all have degree 5, which is maximal for the graph G(9), as seen by putting k = 9 in the Mathematica program.  (See the Example section of A241150.)
		

Crossrefs

Programs

  • Mathematica
    z = 25; spawn[part_] := Map[Reverse[Sort[Flatten[ReplacePart[part, {# - 1, 1}, Position[part, #, 1, 1][[1]][[1]]]]]] &, DeleteCases[DeleteDuplicates[part], 1]];
         unspawn[part_] := If[Length[Cases[part, 1]] > 0, Map[ReplacePart[Most[part], Position[Most[part], #, 1, 1][[1]][[1]] -> # + 1] &, DeleteDuplicates[Most[part]]], {}]; m = Map[Last[Transpose[Tally[Map[#[[2]] &, Tally[Flatten[{Map[unspawn, #], Map[spawn, #]}, 2] &[IntegerPartitions[#]]]]]]] &, 1 + Range[z]];
         Column[m] (* A241150 as an array *)
         Flatten[m] (* A241150 as a sequence *)
         Table[Length[m[[n]]], {n, 1, z}] (* A241151 *)
         Table[Max[m[[n]]], {n, 1, z}] (* A241152 *)
         Table[Last[m[[n]]], {n, 1, z}] (* A241153 *)
         (* Next, show the graph G(k) *)
         k = 8; graph = Flatten[Table[part = IntegerPartitions[k][[n]]; Map[FromDigits[part] -> FromDigits[#] &, spawn[part]], {n, 1, PartitionsP[k]}]]; Graph[graph, VertexLabels -> "Name", ImageSize -> 500, ImagePadding -> 20] (* Peter J. C. Moses, Apr 15 2014 *)

A241900 Irregular triangular array: T(n,k) = number of partitions (nodes) in the k-th component of the graph G'(n) obtained from the partition graph G(n) by deleting all partitions having repeated parts; G and G' are defined in Comments.

Original entry on oeis.org

1, 1, 2, 2, 2, 1, 2, 2, 3, 2, 4, 2, 5, 2, 1, 6, 2, 2, 7, 3, 2, 8, 5, 2, 9, 7, 2, 10, 9, 2, 1, 12, 11, 2, 2, 15, 12, 3, 2, 18, 13, 5, 2, 22, 14, 8, 2, 26, 15, 11, 2, 30, 16, 15, 2, 1, 35, 20, 17, 2, 2, 40, 26, 18, 3, 2, 45, 33, 19, 5, 2, 51, 41, 20, 8, 2, 57
Offset: 1

Views

Author

Clark Kimberling, May 01 2014

Keywords

Comments

The partition graph G(n) is defined at A241150 as follows: the nodes are the partitions of n, and nodes p and q have an edge if one of them can be obtained from the other by a substitution x -> x-1,1 for some part x. Let R be the set of partitions (nodes) of n that contain a repeated part and let E be the set of edges of G(n) that have a node in R. Removing R and E from G(n) leaves a graph G'(n) whose nodes are the strict partitions of n, as in A000009. For n >= 5, G'(n) is disconnected.

Examples

			The first 18 rows of T are represented here:
row 1:  1
row 2:  1
row 3:  2
row 4:  2
row 5:  2 1
row 6:  2 2
row 7:  3 2
row 8:  4 2
row 9:  5 2 1
row 10:  6 2 2
row 11:  7 3 2
row 12:  8 5 2
row 13:  9 7 2
row 14:  10 9 2 1
row 15:  12 11 2 2
row 16:  15 12 3 2
row 17:  18 13 5 2
row 18:  22 14 8 2
The 10 nodes and 7 edges of G'(10) are shown here:  [10] - [9,1], [8,2] - [7,2,1], [7,3] - [6,3,1], [7,3] - [7,2,1], [6,4] - [5,4,1], [6,4] - [6,3,1], [5,3,2] - [4,3,2,1]; the three components are as follows:  [8,2] - [7,2,1] - [7,3] - [6,3,1] - [6,4] - [5,4,1]  (6 nodes); [4,3,2,1] - [5,3,2] (2 nodes); [9,1] - [10]] (2 nodes).  Thus, row 10 of the array is 6 2 2.
		

Crossrefs

Programs

  • Mathematica
    (* The first program generates terms of A241900 and A241901. *)
    z = 30;  spawn[part_] := Map[Reverse[Sort[Flatten[ReplacePart[part, {# - 1, 1}, Position[part, #, 1, 1][[1]][[1]]]]]] &, DeleteCases[DeleteDuplicates[part], 1]]; findComponent[start_] := Reap[BreadthFirstScan[g, start, {"DiscoverVertex" -> ((PropertyValue[{g, #1}, "Visited"] = True; Sow[#1]) &)}]][[2, 1]]; subGLengths = Join[{{1}}, Table[parts = Select[IntegerPartitions[k], DeleteDuplicates[#] == # &]; graph = Flatten[Table[part = parts[[n]]; Map[{part, #} &, Select[spawn[part], DeleteDuplicates[#] == # &]], {n, 1, Length[parts]}], 1]; isolated = Map[{#, #} &, Map[#[[1]] &, Cases[Map[{#, MemberQ[Flatten[graph, 1], #]} &, parts], {{_}, False}]]]; graph = Join[graph, isolated]; {graph, isolated} = Map[Map[FromDigits[#[[1]]] <-> FromDigits[#[[2]]] &, #] &, {graph, isolated}]; g = Graph[graph]; Do[PropertyValue[{g, v}, "Visited"] = False, {v, VertexList[g]}];
    vlists = Reap[Do[If[! PropertyValue[{g, start}, "Visited"], Sow[findComponent[start]]], {start, VertexList[g]}]][[2, 1]]; Reverse[Sort[Map[Length, vlists]]], {k, 2, z}]]; Flatten[%] (* A241900 *)
    Map[#[[1]] &, subGLengths] (* A241901, Peter J. C. Moses, Apr 30 2014 *)
    (* The next program shows the graph G'(z) for user-chosen z. *)
    z = 18; spawn[part_] := Map[Reverse[Sort[Flatten[ReplacePart[part, {# - 1, 1}, Position[part, #, 1, 1][[1]][[1]]]]]] &, DeleteCases[DeleteDuplicates[part], 1]]; findComponent[start_] := Reap[BreadthFirstScan[g, start, {"DiscoverVertex" -> ((PropertyValue[{g, #1}, "Visited"] = True; Sow[#1]) &)}]][[2, 1]]; parts = Select[IntegerPartitions[z], DeleteDuplicates[#] == # &]; graph = Flatten[Table[part = parts[[n]]; Map[{part, #} &, Select[spawn[part], DeleteDuplicates[#] == # &]], {n, 1, Length[parts]}], 1]; isolated = Map[{#, #} &, Map[#[[1]] &, Cases[Map[{#, MemberQ[Flatten[graph, 1], #]} &, parts], {{_}, False}]]]; graph = Join[graph, isolated]; graph = Map[FromDigits[#[[1]]] <-> FromDigits[#[[2]]] &, graph]; isolated = Map[FromDigits[#[[1]]] <-> FromDigits[#[[2]]] &, isolated]; g = Graph[graph, VertexLabels -> "Name", ImageSize -> 500, ImagePadding -> 20, If[Length[isolated] > 0, Apply[EdgeStyle -> {# -> White} &, isolated], EdgeStyle -> "Default"], GraphLayout -> "SpringElectricalEmbedding"] (* Peter J. C. Moses, Apr 30 2014 *)

A241901 Number of nodes (partitions) in the largest component of the graph G'(n) obtained from the partition graph G(n) by deleting all partitions having repeated parts; G and G' are defined in Comments.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 22, 26, 30, 35, 40, 45, 51, 57, 63, 73, 86, 101, 118, 136, 156, 178, 202, 228, 256, 286, 319, 354, 391, 431, 476, 546, 624, 710, 804, 907, 1020, 1143, 1277, 1422
Offset: 1

Views

Author

Clark Kimberling, May 01 2014

Keywords

Comments

The partition graph G(n) is defined at A241150 as follows: the nodes are the partitions of n, and nodes p and q have an edge if one of them can be obtained from the other by a substitution x -> x-1,1 for some part x. Let R be the set of partitions (nodes) of n that contain a repeated part and let E be the set of edges of G(n) that have a node in R. Removing R and E from G(n) leaves a graph G'(n) whose nodes are the strict partitions of n, as in A000009. (The 2nd Mathematica program at A241900 shows G'(n) for n up to 20.)

Examples

			The 10 nodes and 7 edges of G'(10) are shown here:  [10] - [9,1], [8,2] - [7,2,1], [7,3] - [6,3,1], [7,3] - [7,2,1], [6,4] - [5,4,1], [6,4] - [6,3,1], [5,3,2] - [4,3,2,1]; the three components are as follows:  [8,2] - [7,2,1] - [7,3] - [6,3,1] - [6,4] - [5,4,1]  (6 nodes); [4,3,2,1] - [5,3,2] (2 nodes); [9,1] - [10]] (2 nodes).  The largest component has 6 nodes, so that a(10) = 6.
		

Crossrefs

Programs

  • Mathematica
    z = 30; spawn[part_] := Map[Reverse[Sort[Flatten[ReplacePart[part, {# - 1, 1}, Position[part, #, 1, 1][[1]][[1]]]]]] &, DeleteCases[DeleteDuplicates[part], 1]]; findComponent[start_] := Reap[BreadthFirstScan[g, start, {"DiscoverVertex" -> ((PropertyValue[{g, #1}, "Visited"] = True; Sow[#1]) &)}]][[2, 1]]; subGLengths = Join[{{1}}, Table[parts = Select[IntegerPartitions[k], DeleteDuplicates[#] == # &]; graph = Flatten[Table[part = parts[[n]]; Map[{part, #} &, Select[spawn[part], DeleteDuplicates[#] == # &]], {n, 1, Length[parts]}], 1]; isolated = Map[{#, #} &, Map[#[[1]] &, Cases[Map[{#, MemberQ[Flatten[graph, 1], #]} &, parts], {{_}, False}]]]; graph = Join[graph, isolated]; {graph, isolated} = Map[Map[FromDigits[#[[1]]] <-> FromDigits[#[[2]]] &, #] &, {graph, isolated}]; g = Graph[graph]; Do[PropertyValue[{g, v}, "Visited"] = False, {v, VertexList[g]}];
    vlists = Reap[Do[If[! PropertyValue[{g, start}, "Visited"], Sow[findComponent[start]]], {start, VertexList[g]}]][[2, 1]]; Reverse[Sort[Map[Length, vlists]]], {k, 2, z}]];
    Flatten[%]  (* A241900 *)
    Map[#[[1]] &, subGLengths] (* A241901 *)
    (* Peter J. C. Moses, Apr 30 2014 *)
Showing 1-5 of 5 results.