OFFSET
0,20
COMMENTS
Let L(n) be the set of least part primes of all prime partitions of n, and let G(n) be corresponding set of greatest prime parts. All prime partitions, commencing with p in L(n) and terminating with q in G(n) can be shown as unique pathways on a partition tree of n; see link for details. |G(n)| = A000607(n).
LINKS
David James Sycamore, Prime Partition Trees
EXAMPLE
A000607(10) = 5 and the prime partitions of 10 are: (2,2,2,2,2), (2,2,3,3), (2,3,5), (5,5) and (3,7). Thus G(10) = {2,3,5,5,7}, and consequently row 10 is [1,1,2,1]. In the table below, for n >= 2, 0 is used to indicate when prime(k) is not in G(n) and is less than the greatest member of G(n), otherwise the entry for prime(k) not in G(n) is left empty. For n >= 2 the sum of entries in the n-th row is |G(n)| = A000607(n). Triangle T(n,k) begins:
0;
0;
1;
0, 1;
1;
0, 1, 1;
1, 1;
0, 1, 1, 1;
1, 1, 1;
0, 2, 1, 1;
1, 1, 2, 1;
0, 2, 2, 1, 1;
1, 2, 2, 2;
0, 2, 3, 2, 1, 1;
1, 2, 3, 3, 1;
0, 3, 4, 3, 1, 1;
1, 2, 4, 4, 2, 1;
0, 3, 5, 5, 2, 1, 1;
...
MATHEMATICA
Flatten@ Block[{nn = 22, t}, t = Block[{s = {Prime@ PrimePi@ nn}}, KeySort@ Merge[#, Identity] &@ Join[{0 -> {}, 1 -> {}}, Reap[Do[If[# <= nn, Sow[# -> s]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@ s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1] ] ] &@Total[s], {i, Infinity}]][[-1, -1]] ] ]; Array[Function[p, If[! IntegerQ@ First@ p, {0}, Array[Count[p, Prime@ #] &, PrimePi@ Max@ p]]]@ Map[Max, t[[#]]] &, Max@ Keys@ t]] (* Michael De Vlieger, May 23 2020 *)
row[0]={0}; row[k_] := Join[If[OddQ@k, {0}, {}], Last /@ Tally@ Sort[ First /@ IntegerPartitions[k, All, Prime@ Range@ PrimePi@ k]]]; Join @@ Array[row, 20, 0] (* Giovanni Resta, May 31 2020 *)
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
David James Sycamore, Michael De Vlieger, May 23 2020
EXTENSIONS
More terms from Giovanni Resta, May 31 2020
STATUS
approved