OFFSET
1,2
COMMENTS
The runs of a sequence are its maximal consecutive constant subsequences. For example, the runs of {1,1,1,2,2,3,4} are {1,1,1}, {2,2}, {3}, {4}, with sums {3,3,4,4}.
Note that the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so this sequence lists Heinz numbers of partitions whose run-sum trajectory reaches an empty set or singleton.
EXAMPLE
The terms together with their prime indices begin:
1: {} 25: {3,3} 64: {1,1,1,1,1,1}
2: {1} 27: {2,2,2} 67: {19}
3: {2} 29: {10} 71: {20}
4: {1,1} 31: {11} 73: {21}
5: {3} 32: {1,1,1,1,1} 79: {22}
7: {4} 37: {12} 81: {2,2,2,2}
8: {1,1,1} 40: {1,1,1,3} 83: {23}
9: {2,2} 41: {13} 84: {1,1,2,4}
11: {5} 43: {14} 89: {24}
12: {1,1,2} 47: {15} 97: {25}
13: {6} 49: {4,4} 101: {26}
16: {1,1,1,1} 53: {16} 103: {27}
17: {7} 59: {17} 107: {28}
19: {8} 61: {18} 109: {29}
23: {9} 63: {2,2,4} 112: {1,1,1,1,4}
The trajectory 60 -> 45 -> 35 ends in a nonprime number 35, so 60 is not in the sequence.
The trajectory 84 -> 63 -> 49 -> 19 ends in a prime number 19, so 84 is in the sequence.
MATHEMATICA
ope[n_]:=Times@@Prime/@Cases[If[n==1, {}, FactorInteger[n]], {p_, k_}:>PrimePi[p]*k];
Select[Range[100], #==1||PrimeQ[NestWhile[ope, #, !SquareFreeQ[#]&]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 26 2022
STATUS
approved