OFFSET
1,1
COMMENTS
EXAMPLE
The first number line below shows the perfect powers. The second shows each prime.
-1-----4-------8-9------------16----------------25--27--------32------36------------------------49--
===2=3===5===7======11==13======17==19======23==========29==31==========37======41==43======47======
MATHEMATICA
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Table[NestWhile[#+1&, Prime[n], radQ[#]&], {n, 100}]
PROG
(PARI) f(p) = p++; while(!ispower(p), p++); p;
lista(nn) = apply(f, primes(nn)); \\ Michel Marcus, Dec 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 21 2024
STATUS
approved