OFFSET
1,1
COMMENTS
Perfect-powers (A001597) are 1 and numbers with a proper integer root.
EXAMPLE
The prime before 17 is 13, and the interval (13,14,15,16,17) contains only one perfect power 16, so 17 is in the sequence.
The prime before 29 is 23, and the interval (23,24,25,26,27,28,29) contains two perfect powers 25 and 27, so 29 is not in the sequence.
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Select[Range[1000], PrimeQ[#]&&Length[Select[Range[NextPrime[#, -1], #], perpowQ]]==1&]
CROSSREFS
For non prime powers we have A006512.
For zero instead of one perfect power we have the prime terms of A345531.
The indices of these primes are the positions of 1 in A377432.
The indices of these primes are 1 + A377434(n-1).
For more than one perfect power see A377466.
Swapping "prime" with "perfect power" gives A378374.
For next instead of previous prime we have A379154.
A081676 gives the greatest perfect power <= n.
A377468 gives the least perfect power > n.
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Dec 16 2024
STATUS
approved