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}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Oct 01 2018
STATUS
approved