OFFSET
1,5
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
LINKS
EXAMPLE
The partition (3,3) has Heinz number 25 and diagram
o o o
o o o
containing maximal triangular partition
o o
o
and contained in minimal triangular partition
o o o o
o o o
o o
o
so a(25) = 4 - 2 = 2.
MATHEMATICA
primeptn[n_]:=If[n==1, {}, Reverse[Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]]];
otb[ptn_]:=Min@@MapIndexed[#1+#2[[1]]-1&, Append[ptn, 0]];
otbmax[ptn_]:=Max@@MapIndexed[#1+#2[[1]]-1&, Append[ptn, 0]];
Table[otbmax[primeptn[n]]-otb[primeptn[n]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 11 2019
STATUS
approved