OFFSET
0,1
COMMENTS
Prime powers are listed by A246655.
Conjecture: All terms except 9 are prime. Hence this is the same as A014210 after 9. Confirmed up to n = 1000.
From Lechoslaw Ratajczak, Oct 13 2025: (Start)
Let b(i,j,t) (i >= 1, 1 <= j <= i, t >= 1) be the recursive sequence defined by b(i,j,1) = i mod j, b(i,j,t) = (i + Sum_{k=1..t-1} b(i,j,k)) mod j, and s(m) counts numbers u (1 <= u <= m) for which there is such r that b(m,u,r) attains value of 0 (the initial terms of s(m) (m >= 1) are: 1, 2, 3, 3, 4, 5, 4, 4, 7, 6,...).
Conjecture: if i and j are coprime then b(i,j,t) attains value of 0 iff j is power of 2. If this conjecture and the Wiseman conjecture are true, the consecutive indices of records of the sequence c(d) = totient(d) - d + s(d) (d >= 2) are consecutive terms of (a(n)) (the initial terms of c(d) (d >= 2) are: 1, 2, 1, 3, 1, 3, 0, 4, 0, 4,...). (End)
MATHEMATICA
Table[NestWhile[#+1&, 2^n+1, !PrimePowerQ[#]&], {n, 0, 20}]
PROG
(Python)
from itertools import count
from sympy import primefactors
def A378252(n): return next(i for i in count(1+(1<<n)) if len(primefactors(i))==1) # Chai Wah Wu, Dec 02 2024
(PARI) a(n) = my(x=2^n+1); while (!isprimepower(x), x++); x; \\ Michel Marcus, Dec 03 2024
CROSSREFS
Subtracting 2^n appears to give A013597 except at term 3.
For prime we have A014210.
For previous we have A014234.
For perfect power we have A357751.
For squarefree we have A372683.
A000015 gives the least prime power >= n.
A031218 gives the greatest prime power <= n.
A244508 counts prime powers between powers of 2.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 30 2024
STATUS
approved
