OFFSET
1,3
COMMENTS
The k-th part of the origin-to-boundary partition of a Young diagram is the number of squares graph-distance k from the lower-right boundary.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
LINKS
Eric Weisstein's World of Mathematics, Graph Distance.
EXAMPLE
The partition with Heinz number 7865 is (6,5,5,3), with diagram
o o o o o o
o o o o o
o o o o o
o o o
with origin-to-boundary graph-distances
4 4 4 3 2 1
3 3 3 2 1
2 2 2 1 1
1 1 1
giving the origin-to-boundary partition (7,5,4,3) with last part 3, so a(7865) = 3.
MATHEMATICA
primeptn[n_]:=If[n==1, {}, Reverse[Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]]];
ptnmat[ptn_]:=PadRight[(ConstantArray[1, #]&)/@Sort[ptn, Greater], {Length[ptn], Max@@ptn}+1];
corpos[mat_]:=ReplacePart[mat, Select[Position[mat, 1], Times@@Extract[mat, {#+{1, 0}, #+{0, 1}}]==0&]->0];
Table[Apply[Plus, If[n==1, {}, FixedPointList[corpos, ptnmat[primeptn[n]]][[-3]]], {0, 1}], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 08 2019
STATUS
approved