A191474 Smallest prime q such that q + prime(n) is a power of 2.
2, 5, 3, 549755813881, 5, 3, 47, 13, 41, 3, 97, 2011, 23, 536870869, 17, 11, 5, 3, 61, 953, 439, 433, 173, 167, 31, 67108763, 409, 149, 19, 911, 140737488355201, 16253, 887, 373, 107, 2147483497, 32611, 349, 89, 83, 3917, 331, 16193, 2096959, 59, 313, 33554221
Offset: 1
Keywords
Examples
2 + 2 = 2^2, 3 + 5 = 2^3, 5 + 3 = 2^3, 7 + 549755813881 = 2^39, 11 + 5 = 2^4.
Links
- Robert Israel, Table of n, a(n) for n = 1..285
Programs
-
Maple
f:= proc(n) local p,m,t,q; p:= ithprime(n); for t from ilog2(p) do q:= 2^t - p; if isprime(q) then return q fi; od; end proc: map(f, [$1..50]); # Robert Israel, Dec 23 2020
-
Mathematica
f[p_] := NestWhile[2 # &, 2^Ceiling[Log[2, p]], ! PrimeQ[# - p] &] - p; f /@ Prime@Range@47 (* David Trimas, Jul 30 2023 *)
Extensions
a(26) corrected by Robert Israel, Dec 23 2020
Comments