OFFSET
1,2
EXAMPLE
The first number-line below shows the perfect powers. The second shows each positive integer k at position prime(k).
-1-----4-------8-9------------16----------------25--27--------32------36----
===1=2===3===4=======5===6=======7===8=======9==========10==11==========12==
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Select[Range[0, 100], #==0||Length[Select[Range[Prime[#]+1, Prime[#+1]-1], perpowQ]]>0&]
CROSSREFS
A version for squarefree numbers is A377431.
Positions of positive terms in A377432 (counts perfect powers between primes).
The case of a unique choice is A377434 (a subset).
The complement (no choices) is A377436.
The case of at least two choices is A377466 (a subset).
Positions of last appearances in A378249.
First-differences are A378251.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A131605 lists perfect powers that are not prime powers.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 21 2024
STATUS
approved