OFFSET
1,2
COMMENTS
What is the union of this sequence? In particular, does it contain 17?
MATHEMATICA
Differences[Table[NestWhile[#+1&, Prime[n]+1, !PrimePowerQ[#]&], {n, 100}]]
PROG
(Python)
from sympy import factorint, prime, nextprime
def A377703(n): return -next(filter(lambda m:len(factorint(m))<=1, count((p:=prime(n))+1)))+next(filter(lambda m:len(factorint(m))<=1, count(nextprime(p)+1))) # Chai Wah Wu, Nov 14 2024
CROSSREFS
First differences of A345531.
A080101 counts prime-powers between primes (exclusive).
A366833 counts prime-powers between primes, see A053607, A304521, A377057 (positive), A377286 (zero), A377287 (one), A377288 (two).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 07 2024
STATUS
approved