OFFSET
1,2
COMMENTS
The distance graph of the partitions of n is defined in A366156.
EXAMPLE
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.
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]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Clark Kimberling, Oct 25 2023
STATUS
approved