A378252 Least prime power > 2^n.
2, 3, 5, 9, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459, 536870923, 1073741827, 2147483659, 4294967311, 8589934609
Offset: 0
Keywords
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.
Programs
-
Mathematica
Table[NestWhile[#+1&,2^n+1,!PrimePowerQ[#]&],{n,0,20}]
-
PARI
a(n) = my(x=2^n+1); while (!isprimepower(x), x++); x; \\ Michel Marcus, Dec 03 2024
-
Python
from itertools import count from sympy import primefactors def A378252(n): return next(i for i in count(1+(1<
Chai Wah Wu, Dec 02 2024
Comments