OFFSET
1,1
COMMENTS
A positive integer is in this sequence iff it can be reduced to a prime number by a sequence of collapses, where a collapse is a replacement of prime(n)^k with prime(n*k) in a number's prime factorization (k > 1).
EXAMPLE
A sequence of collapses is 84 -> 63 -> 49 -> 19 corresponding to the sequence of partitions (4211) -> (422) -> (44) -> (8). Hence 84 is in the sequence.
MATHEMATICA
primeMS[n_]:=If[n===1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
repcaps[q_]:=Union[{q}, If[SquareFreeQ[q], {}, Union@@repcaps/@Union[Times[q/#, Prime[Plus@@primeMS[#]]]&/@Select[Rest[Divisors[q]], !PrimeQ[#]&&PrimePowerQ[#]&]]]];
Select[Range[200], MemberQ[repcaps[#], _?PrimeQ]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 01 2018
STATUS
approved