OFFSET
1,2
COMMENTS
EXAMPLE
The first number line below shows the perfect powers. The second shows each prime. To get a(n), we take the last perfect power in each interval between consecutive primes, omitting the cases where there are none.
-1-----4-------8-9------------16----------------25--27--------32------36----
===2=3===5===7======11==13======17==19======23==========29==31==========37==
MATHEMATICA
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Union[Table[NestWhile[#-1&, Prime[n], radQ[#]&], {n, 1000}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 26 2024
STATUS
approved