OFFSET
0,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..2000
EXAMPLE
a(3) = 11 because the highest power of 2 dividing 11-3=8 is 2^3, and 11 is the least prime with this property.
MAPLE
f:= proc(n) local k;
for k from 1 by 2 do
if isprime(k*2^n+3) then return k*2^n+3 fi
od
end proc:
f(0):= 2:
map(f, [$0..100]);
PROG
(PARI) a(n) = forprime(p=1, , if(valuation(p-3, 2)==n, return(p))) \\ Felix Fröhlich, Aug 23 2018
(Python)
from sympy import isprime
def A318207(n):
if n == 0: return 2
a = 1<<n
b = a<<1
while True:
if isprime(a+3):
return a+3
a += b # Chai Wah Wu, Jul 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Aug 21 2018
STATUS
approved