OFFSET
1,1
COMMENTS
Primes of the form k*2^m + 1 where k <= m and k is odd. - David A. Corneth, Mar 03 2023
EXAMPLE
3 is a term because the odd part of 2 is 1, the dyadic valuation of 2 is 1 and 1 <= 1.
641 = 5*2^7 + 1 is a term because the odd part of 640 is 5, the dyadic valuation of 640 is 7 and 5 <= 7.
MAPLE
# Maple program due to David A. Corneth, Mar 03 2023
aList := proc(upto)
local i, j, p, R:
R := {}:
for i from 1 to ilog2(upto) do
for j from 1 to min(i, floor(upto/2^i)) do
p := j*2^i+1:
if isprime(p) then R := `union`(R, {p}): fi: od: od:
R: end:
aList(10^12);
PROG
(PARI) isok(p) = if (isprime(p), my(m=valuation(p-1, 2)); (p-1)/2^m <= m); \\ Michel Marcus, Mar 03 2023
(PARI) upto(n) = {my(res = List()); for(i = 1, logint(n, 2), forstep(j = 1, min(i, n>>i), 2, if(isprime((j<<i) + 1), listput(res, (j<<i) + 1) ) ) ); Set(res) } \\ David A. Corneth, Mar 03 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Lorenzo Sauras Altuzarra, Mar 03 2023
EXTENSIONS
a(17)..a(27) from Michel Marcus, Mar 03 2023
More terms from David A. Corneth, Mar 03 2023
STATUS
approved