OFFSET
1,1
COMMENTS
Is this sequence finite?
The Redmond-Sun conjecture (see A308658) implies that this sequence is finite. - Pontus von Brömssen, Nov 05 2024
FORMULA
a(n) = A000720(A116086(n)) = A000720(A116455(n)) for n <= 10. This would hold for all n if there do not exist more than two perfect powers between any two consecutive primes, which is implied by the Redmond-Sun conjecture. - Pontus von Brömssen, Nov 05 2024
EXAMPLE
Primes 9 and 10 are 23 and 29, and the interval (24,25,26,27,28) contains two perfect powers (25,27), so 9 is in the sequence.
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Select[Range[100], Count[Range[Prime[#]+1, Prime[#+1]-1], _?perpowQ]>1&]
PROG
(Python)
from itertools import islice
from sympy import prime
from gmpy2 import is_power, next_prime
def A377466_gen(startvalue=1): # generator of terms >= startvalue
k = max(startvalue, 1)
p = prime(k)
while (q:=next_prime(p)):
c = 0
for i in range(p+1, q):
if is_power(i):
c += 1
if c>1:
yield k
break
k += 1
p = q
CROSSREFS
For a unique prime-power we have A377287.
These are the positions of terms > 1 in A377432.
For a unique perfect power we have A377434.
For no perfect powers we have A377436.
A000015 gives the least prime power >= n.
A081676 gives the greatest perfect power <= n.
A131605 lists perfect powers that are not prime-powers.
A377468 gives the least perfect power > n.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 02 2024
EXTENSIONS
a(10) from Pontus von Brömssen, Nov 04 2024
STATUS
approved