OFFSET
1,5
EXAMPLE
The next prime-power after 13 is 16, so a(12) = 3.
MATHEMATICA
Table[NestWhile[#+1&, n+1, !PrimePowerQ[#]&]-n, {n, 100}]
PROG
(Python)
from itertools import count
from sympy import factorint
def A377282(n): return next(filter(lambda m:len(factorint(m))<=1, count(n+1)))-n # Chai Wah Wu, Oct 25 2024
CROSSREFS
For prime instead of prime-power we have A013632.
The restriction to the prime numbers is A377281.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 23 2024
STATUS
approved