OFFSET
0,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2500 (first 1001 terms from T. D. Noe)
FORMULA
a(n) = Min{p|p+2^n=q, both p and q are primes}.
EXAMPLE
n=9, 512 + {2,3,5,7,11,...} = {514,515,519,523,...} = {2*257, 5*103, 11*47, 3*173, 523=prime, ...}. The smallest suitable prime is 11 and it gives 523 = 512 + 11. So a(9)=11.
MAPLE
a:= proc(n) option remember; local o, p; o, p:=2^n, 2;
while not isprime(o+p) do p:= nextprime(p) od; p
end:
seq(a(n), n=0..75); # Alois P. Heinz, Mar 20 2023
MATHEMATICA
Table[i=1; While[!PrimeQ[2^n+(p=Prime[i])], i++]; p, {n, 0, 72}] (* Jayanta Basu, May 23 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 06 2000
EXTENSIONS
a(0) from Jayanta Basu, May 23 2013
STATUS
approved