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.

A366597 Irregular triangular array, read by rows: T(n,k) = number of vertices (partitions) that have degree k in the distance graph of the partitions of n, for k = 1..A366429(n).

Original entry on oeis.org

0, 2, 2, 1, 2, 1, 2, 2, 0, 4, 1, 2, 2, 2, 4, 0, 1, 2, 0, 4, 7, 0, 0, 2, 2, 2, 2, 9, 2, 0, 4, 1, 2, 1, 4, 11, 2, 0, 4, 6, 2, 2, 2, 14, 6, 0, 4, 9, 2, 0, 0, 1, 2, 0, 4, 17, 6, 0, 2, 19, 4, 0, 0, 0, 2, 2, 4, 2, 16, 10, 1, 6, 17, 14, 0, 0, 0, 4, 1, 2, 0, 4, 23
Offset: 1

Views

Author

Clark Kimberling, Oct 16 2023

Keywords

Comments

The distance graph of the partitions of n is defined in A366156.

Examples

			First fourteen rows:
   1
   2
   2   1
   2   1   2
   2   0   4   1
   2   2   2   4    0    1
   2   0   4   7    0    0   2
   2   2   2   9    2    0   4   1
   2   1   4   11   2    0   4   6
   2   2   2   14   6    0   4   9   2   0   0   1
   2   0   4   17   6    0   2  19   4   0   0   0   2
   2   4   2   16   10   1   6  17   14  0   0   0   4   1
   2   0   4   23   10   0   2  27   22  1   0   0   4   6
   2   2   2   22   18   2   4  27   32  4   0   0   6   12   2
Enumerate the 7 partitions (vertices) of 5 as follows:
  1: 5
  2: 4,1
  3: 3,2
  4: 3,1,1
  5: 2,2,1
  6: 2,1,1,1
  7: 1,1,1,1,1
Call q a neighbor of p if d(p,q)=2, where d is the distance function in A366156.
The set of neighbors for vertex k, for k = 1..7, is given by
  vertex 1: {2}
  vertex 2: {1,3,4}
  vertex 3: {2,4,5}
  vertex 4: {2,3,5,6}
  vertex 5: {3,4,6}
  vertex 6: {4,5,7}
  vertex 7: {6}
The number of vertices having degrees 1,2,3,4 are 2,0,4,1, respectively, so that row 5 is 2 0 4 1.
		

Crossrefs

Cf. A000041 (row sums), A366429 (row lengths), A366598 (row maxima).

Programs

  • Mathematica
    c[n_] := PartitionsP[n]; q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
    r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
    d[u_, v_] := Total[Abs[u - v]];
    s[n_, k_] := Select[Range[c[n]], d[r[n, k], r[n, #]] == 2 &];
    s1[n_] := s1[n] = Table[s[n, k], {k, 1, c[n]}];
    m[n_] := m[n] = Map[Length, s1[n]];
    m1[n_] := m1[n] = Max[m[n]];  (* A366429 *)
    t1 = Join[{1}, Table[Count[m[n], i], {n, 2, 15}, {i, 1, m1[n]}]]
    Column[t1]
    Flatten[t1]

A366461 a(n) = number of partitions of n that have the maximum number of neighbors; see Comments.

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 2, 1, 6, 1, 2, 1, 6, 2, 1, 2, 1, 6, 2, 8, 1, 2, 1, 6, 2, 8, 1, 1, 2, 1, 6, 2, 8, 1, 6, 1, 2, 1, 6, 2, 8, 1, 6, 22, 1, 2, 1, 6, 2, 8, 1, 6, 22, 2, 1, 2, 1, 6, 2, 8, 1, 6, 22, 2, 8, 1, 2, 1, 6, 2, 8, 1, 6, 22, 2, 8, 30, 1, 2, 1, 6, 2, 8, 1, 6, 22
Offset: 1

Views

Author

Clark Kimberling, Oct 12 2023

Keywords

Comments

Partitions p and q of n are neighbors if d(p,q) = 2, where d is the distance function in A366156.

Examples

			Refer to the Example in A366429 to see that a(5) = 1.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := PartitionsP[n];
    q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
    r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
    d[u_, v_] := d[u, v] = Total[Abs[u - v]];
    s[n_, k_] := s[n, k] = Select[Range[c[n]], d[r[n, k], r[n, #]] == 2 &]
    t[n_] := t[n] = Table[s[n, k], {k, 1, c[n]}]
    a[n_] := Max[Map[Length, t[n]]]
    b[n_] := b[n] = Select[t[n], Length[#] == a[n] &]
    e[n_] := Length[b[n]]
    Table[e[n], {n, 1, 24}]

Extensions

More terms from Pontus von Brömssen, Oct 24 2023

A366598 a(n) = greatest number of vertices having the same degree in the distance graph of the partitions of n.

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 7, 9, 11, 14, 19, 17, 27, 32, 50, 62, 82, 94, 132, 138, 176, 198, 238, 288, 368
Offset: 1

Views

Author

Clark Kimberling, Oct 25 2023

Keywords

Comments

The distance graph of the partitions of n is defined in A366156.

Examples

			Enumerate the 7 partitions (= vertices) of 5 as follows:
  1: 5
  2: 4,1
  3: 3,2
  4: 3,1,1
  5: 2,2,1
  6: 2,1,1,1
  7: 1,1,1,1,1
Call q a neighbor of p if d(p,q)=2.
The set of neighbors for vertex k, for k = 1..7, is given by
  vertex 1: {2}
  vertex 2: {1,3,4}
  vertex 3: {2,4,5}
  vertex 4: {2,3,5,6}
  vertex 5: {3,4,6}
  vertex 6: {4,5,7}
  vertex 7: {6}
The number of vertices having degrees 1,2,3,4 are 2,0,4,1, respectively; the greatest of these is 4, so that a(5) = 4.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := PartitionsP[n]; q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
    r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
    d[u_, v_] := Total[Abs[u - v]];
    s[n_, k_] := Select[Range[c[n]], d[r[n, k], r[n, #]] == 2 &]
    s1[n_] := s1[n] = Table[s[n, k], {k, 1, c[n]}]
    m[n_] := m[n] = Map[Length, s1[n]]
    m1[n_] := m1[n] = Max[m[n]];  (* A366429 *)
    t1 = Join[{1}, Table[Count[m[n], i], {n, 2, 25}, {i, 1, m1[n]}]]
    Map[Max, t1]
Showing 1-3 of 3 results.