Closest Woodall Prime A Woodall Prime is a prime which can be calculated, given a positive integer n, with n * 2^n - 1.

Your task is to, given a integer k, generate a Woodall Prime with k digits. If no such Woodall Prime exists, you must generate a Woodall Prime with the closest amount of digits. If two primes exist with the same digit count difference, you may use either.

You may assume that there exists no two Woodall Primes with the same amount of digits.

There is no time complexity limit, and you must be able to handle at least the first ten Woodall Primes (you can see them in the OEIS link at the start of the question)

You may write a full program or a function, and you may print or return the output.

Examples:

1 -&gt; 7
4 -&gt; 383
0 -&gt; 7
-100 -&gt; 7
7 -&gt; 383 or 32212254719 (you may pick either of these)
8 -&gt; 32212254719


As this is code-golf, that shortest code wins!

(there are only nine Woodall Primes on the linked OEIS sequence, so you might want to look at this for more Woodall Primes: https://oeis.org/A002234)
Brachylog, 28 26 bytes
:K≜+ℕ~lṗ.+₁~×[İ,J]h:2^₍J≜∧

Try it online!
This is too slow for TIO for inputs bigger than 4.
Explanation
:K                             The list [Input, K]
  ≜                            Assign a value to K (0, then 1, then -1, then 2, etc.)
   +ℕ                          Input + K &gt;= 0
     ~l .                      Output is a number of length (Input + K)
       ṗ.                      Output must be a prime number
         +₁                    Output + 1...
           ~×[İ,J]             ... = İ × J, İ being an integer...
                  h:2^₍J       ... and J = 2^İ
                         ≜∧    Check that it is possible to find a value for İ that satisfies
                                 all of those constraints. If not, go back to the beginning
                                 and try another value for K through backtracking.

We use a common trick in Brachylog for &quot;find the closest X to Y&quot;: labeling a completely free variable (which we do when we use ≜ on the list [Input, K] will label it with this pattern: 0, 1, -1, 2, -2, 3, .... Therefore, when backtracking if the value Input + K doesn't work as the number of digits, the next choice we will try will be the next possible closest choice.