login
A319909
Number of distinct positive integers that can be obtained by iteratively adding any two or multiplying any two non-1 parts of an integer partition until only one part remains, starting with 1^n.
8
0, 1, 1, 1, 1, 2, 4, 5, 10, 15, 21, 34, 49, 68, 101, 142, 197, 280, 387, 538, 751, 1045, 1442, 2010, 2772, 3865, 5339, 7396, 10273, 14201, 19693
OFFSET
0,6
EXAMPLE
We have
7 = 1+1+1+1+1+1+1,
8 = (1+1)*(1+1+1)+1+1,
9 = (1+1)*(1+1)*(1+1)+1,
10 = (1+1+1+1+1)*(1+1),
12 = (1+1+1)*(1+1+1+1),
so a(7) = 5.
MATHEMATICA
ReplaceListRepeated[forms_, rerules_]:=Union[Flatten[FixedPointList[Function[pre, Union[Flatten[ReplaceList[#, rerules]&/@pre, 1]]], forms], 1]];
mexos[ptn_]:=If[Length[ptn]==0, {0}, Union@@Select[ReplaceListRepeated[{Sort[ptn]}, {{foe___, x_, mie___, y_, afe___}:>Sort[Append[{foe, mie, afe}, x+y]], {foe___, x_?(#>1&), mie___, y_?(#>1&), afe___}:>Sort[Append[{foe, mie, afe}, x*y]]}], Length[#]==1&]];
Table[Length[mexos[Table[1, {n}]]], {n, 30}]
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Oct 01 2018
STATUS
approved