[Question]
  [
A number is a de Polignac number if and only if it is **odd** and *cannot* be represented in the form **p + 2n** where **n** is a non-negative integer and **p** is a prime integer.
# Task
Write some code that takes a positive integer and determines if it is a de Polignac number. You may output two distinct values one for true and one for false. You should aim to minimize your byte count.
# Test Cases
[For positive cases here's the OEIS](http://oeis.org/A006285)
```
1, 127, 149, 251, 331, 337, 373, 509, 599, 701, 757, 809, 877, 905, 907, 959, 977, 997, 1019, 1087, 1199, 1207, 1211, 1243, 1259, 1271, 1477, 1529, 1541, 1549, 1589, 1597, 1619, 1649, 1657, 1719, 1759, 1777, 1783, 1807, 1829, 1859, 1867, 1927, 1969, 1973, ...
```
Here are some negative cases:
```
22, 57
```
  
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~9~~ ~~14~~ 13 bytes
```
o!²mnU dj |Uv
```
[Test it online!](http://ethproductions.github.io/japt/?v=1.4.5&code=byGybW5VIGRqIHxVdg==&input=MTI3) or [Find all de Polignac integers under 1000](http://ethproductions.github.io/japt/?v=1.4.5&code=MTAwMG8gZlV7IShVdiCqVW8hsm1uVSBkag==&input=).
Outputs `1` for falsy inputs and `0` for truthy.
### Explanation
```
 o!²  mnU dj |Uv
Uo!p2 mnU dj |Uv  : Ungolfed
                  : Implicit: U = input integer (e.g. 9)
Uo                : Create the range [0..U), and map each item X to
  !p2             :   2 ** X.               [1, 2, 4, 8, 16, 32, 64, 128, 256]
      m           : Map each of these powers of 2 by
       nU         :   subtracting from U.   [8, 7, 5, 1, -7, -23, -57, -119, -247]
          d       : Return whether any item in the result is
           j      :   prime.                (5 and 7 are, so `true`)
             |    : Take the bitwise OR of this and
              Uv  :   U is divisble by (missing argument = 2).
                  : This gives 1 if U cannot be represented as p + 2^n or if U is even.
                  : Implicit: output result of last expression
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~11~~ 10 bytes
*Saved 1 byte thanks to @Dennis*
```
Ḷ2*³_ÆPS<Ḃ
```
[Try it online!](https://tio.run/##ASEA3v9qZWxsef//4bi2MirCs1/DhlDCrDvhuILhuqD///8xMjc "Jelly – Try It Online")
### How it works
```
Ḷ2*³_ÆPS<Ḃ   Main link. Argument: n (integer)
Ḷ            Lowered range; yield [0, 1, 2, ..., n-1].
 2*          Reversed exponentiation with 2; yield [1, 2, 4, ..., 2**(n-1)].
   ³_        Reversed subtraction with the input; yield [n-1, n-2, n-4, ..., n-2**(n-1)].
     ÆP      Replace each item with 1 if it is prime, 0 otherwise.
       S     Sum; yield a positive integer if any item was prime, 0 otherwise.
         Ḃ   Yield n % 2.
        <    Yield 1 if the sum is less than n % 2, 0 otherwise.
             This yields 1 if and only if the sum is 0 and n is odd.
```
[Answer]
# JavaScript (ES6), ~~56 54~~ 53 bytes
Returns \$0\$ or \$1\$.
```
f=(n,p=1,x=y=n-p)=>n>p?y%--x?f(n,p,x):x!=1&f(n,p*2):n
```
[Try it online!](https://tio.run/##HYyxDsIgFEX3fgUOGp4ppHVs8tq4OujgaByaCg1KHgQaA1@PreM95@S@x@8Yp2D8Isi9VCkaOdUe2zphRhIesKfeD3kvRBr05uoEXdphe/iv4wk6KpOj6KyS1s28Yuxyv11lXIKh2ei8EcYeUspzCGPmbdM0ID8qRw5PqY1dVODEsGfrI8BaQwXlBw "JavaScript (Node.js) – Try It Online")
### How?
We start with \$p = 1\$. We test whether \$y = n - p\$ is composite and yield a boolean accordingly. The next test is performed with \$p \times 2\$.
As soon as \$p\$ is greater than \$n\$, we stop the recursion and return \$n\$.
The results of all iterations are AND'd together, coercing the boolean values to either \$0\$ or \$1\$.
Provided that all intermediate results were truthy, we end up with a bitwise test such as:
`1 & 1 & 1 & n`
This gives \$1\$ if and only if \$n\$ is odd, which is the last condition required to validate the input as a de Polignac number.
[Answer]
# [Python 2](https://docs.python.org/2/), ~~60~~ ~~57~~ 56 bytes
```
f=lambda n,k=1,p=-1:k/n or(n-k&n-k-p%k>0)&n&f(n,k+1,p*k)
```
[Try it online!](https://tio.run/##FcoxDgIhEEDRGk4xjQQUIlhuwp5lMC5K0IGwNJ6eZYtf/Vf//VPoMUb03/B7vgKQzt7p6o1b8p2gNEkmi5mpl7xaJUhEOdFtomtWI5YGBImgBXpv0mlw1lq1cBb2fWsdcHKFp5BoUQM6VJyzFOEc07HaEnWgcQA "Python 2 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
*An alternative 10-byte Jelly submission to the one already posted.*
```
_ÆRBS€’×ḂẠ
```
A monadic link returning **1** for de Polignac numbers and **0** otherwise.
**[Try it online!](https://tio.run/##ASEA3v9qZWxsef//X8OGUkJT4oKs4oCZw5fhuILhuqD///8xMjc "Jelly – Try It Online")** or see [those under 1000](https://tio.run/##y0rNyan8/z/@cFuQU/CjpjWPGmYenv5wR9PDXQv@n9h@uB0oFPIfAA "Jelly, test suite – Try It Online").
### How?
```
_ÆRBS€’×ḂẠ - Link: number, n  e.g.  1    3      5                  6                   127
 ÆR        - prime range            []   [2]    [2,3,5]            [2,3,5]             [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127]
_          - subtract from n        []   [1]    [3,2,0]            [4,3,1]             [125,124,122,120,116,114,110,108,104,98,96,90,86,84,80,74,68,66,60,56,54,48,44,38,30,26,24,20,18,14,0]
   B       - convert to binary      []   [[1]]  [[1,1],[1,0],[0]]  [[1,0,0],[1,1],[1]  [[1,1,1,1,1,0,1],[1,1,1,1,1,0,0],[1,1,1,1,0,1,0],[1,1,1,1,0,0,0],[1,1,1,0,1,0,0],[1,1,1,0,0,1,0],[1,1,0,1,1,1,0],[1,1,0,1,1,0,0],[1,1,0,1,0,0,0],[1,1,0,0,0,1,0],[1,1,0,0,0,0,0],[1,0,1,1,0,1,0],[1,0,1,0,1,1,0],[1,0,1,0,1,0,0],[1,0,1,0,0,0,0],[1,0,0,1,0,1,0],[1,0,0,0,1,0,0],[1,0,0,0,0,1,0],[1,1,1,1,0,0],[1,1,1,0,0,0],[1,1,0,1,1,0],[1,1,0,0,0,0],[1,0,1,1,0,0],[1,0,0,1,1,0],[1,1,1,1,0],[1,1,0,1,0],[1,1,0,0,0],[1,0,1,0,0],[1,0,0,1,0],[1,1,1,0],0]
    S€     - sum €ach               []   [1]    [2,1,0]            [1,2,1]             [6,5,5,4,4,4,5,4,3,3,2,4,4,3,2,3,2,2,4,3,4,2,3,3,4,3,2,2,2,3,0]
      ’    - decrement              []   [0]    [1,0,-1]           [0,1,0]             [5,4,4,3,3,3,4,3,2,2,1,3,3,2,1,2,1,1,3,2,3,1,2,2,3,2,1,1,1,2,-1]
        Ḃ  - n mod 2                1    1      1                  0                   1
       ×   - multiply               []   [0]    [1,0,-1]           [0,0,0]             [5,4,4,3,3,3,4,3,2,2,1,3,3,2,1,2,1,1,3,2,3,1,2,2,3,2,1,1,1,2,-1]
         Ạ - all truthy?            1    0      0                  0                   1
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~9~~ 8 bytes
-1 byte thanks to Emigna
```
Ýo-pZ¹È~
```
Outputs `0` for truthy inputs and `1` for falsy inputs.
[Try it online!](https://tio.run/##MzBNTDJM/f//8Nx83YKoQzsPd9T9/29oZA4A "05AB1E – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), 99 bytes
```
lambda n:n&1-any(n-2**k>1and all((n-2**k)%j for j in range(2,n-2**k))for k in range(len(bin(n))-2))
```
[Try it online!](https://tio.run/##RclBDoIwEAXQq8wGM0PsohN0YSInYTMEqoX6IQ0bTl80IXH73rpv7wVawrMryT79YIQHLt4ZdobTup5bbxjIUuITpJooLJkmiqBseI2s17PkF/M/0gjuIxgiTkXKmiM2Dqx39c3tCwc "Python 2 – Try It Online")
-4 bytes thanks to Leaky Nun
-2 bytes thanks to Wondercricket
+8 bytes to fix a mistake
-1 byte thanks to Mr. Xcoder
-3 bytes thanks to Einkorn Enchanter 
+12 bytes to fix a mistake
[Answer]
# Regex (ECMAScript), 97 bytes
This problem posed an interesting case for working around the problem of lacking non-atomic lookahead. And it's the only time so far that I've had a good reason to put both versions of the power of 2 test, `((x+)(?=\2$))*x$` and `(?!(x(xx)+)\1*$)`, in the same regex, and the only time so far I've needed to protect the prime test against matching 1, as `(?!(xx+)\1+$)xx`, when used in a larger regex.
`^(?!(xx)*$|(x+)((?!(xx+)\4+$).*(?=\2$)((x+)(?=\6$))*x$|(?!(x(xx)+)\7*$).*(?=\2$)(?!(xx+)\9+$)xx))`
[Try it online!](https://tio.run/##TY/LbsIwEEV/BaIIZpImJBGlKq5h1QUbFu2ytJIFJnFrHMs2kPL49tRRhcRuZs65Gt1vdmB2bYR2idViw82uVj/8tzVU8WPvjZevjQY40dkoar9g3oemwSi8QBMj/K8xrsZxiGkEc7oqQn/umJ8nIWLUeLfTupw3n6J785Z/9nnPsY1GJ0xd/e6MUCVgaqVYc5g8JGNEYmlGjpWQHEBSw9lGCsUBsU/VXko8l1SmVkvhYJgMkYgtgKJlKrkqXYWz4nIRdsmWIKhmxvKFclB@ZJ@IN8DvgZrl83zaYXSVqY/BQh2YFJueYark014QS7KtDRDxQjkRcYz@YdAEqeGaMwcC0x1z6woM4tkOBtpXctC1yIneO@uMV8j12mZJXjxmfw "JavaScript (SpiderMonkey) – Try It Online")
```
# For the purposes of these comments, the input number = N.
^
# Assert that N is not the sum of a prime number and a power of 2.
(?!
    (xx)*$                 # Assert that N is odd.
|
    # Since we must cycle through all values for a number X and a corresponding number
    # N-X, this cannot be in an atomic lookahead. The problem then becomes that it
    # consumes characters. Thus we must let X be the larger of the two and N-X be the
    # smaller, and do tests on X followed by tests on N-X. We can't just test X for
    # being prime and N-X for being a power of 2, nor vice versa, because either one
    # could be smaller or larger. Thus, we must test X for being either prime or a
    # power of 2, and if it matches as being one of those two, do the opposite test on
    # N-X.
    # Note that the prime test used below, of the form (?!(xx+)\2+$), has a false match
    # for 0 and 1 being prime. The 0 match is harmless for our purposes, because it
    # will only result in a match for N being a power of 2 itself, thus rejecting
    # powers of 2 as being de Polignac numbers, but since we already require that N is
    # odd, we're already rejecting powers of 2 implicitly. However, the 1 match would
    # break the robustness of this test. There can be de Polignac numbers of the form
    # 2^M+1, for example 262145 and 2097153. So we must discard the 1 match by changing
    # the prime test to "(?!(xx+)\2+$)xx". We only need to do this on the N-X test,
    # though, because as X is the larger number, it is already guaranteed not to be 1.
    (x+)           # \2 = N-X = Smaller number to test for being prime or a power of 2;
                   # tail = X = larger number to test for being prime or a power of 2.
    (
        (?!(xx+)\4+$)      # Test X for being prime.
        .*(?=\2$)          # tail = N-X
        ((x+)(?=\6$))*x$   # Test N-X for being a power of 2. Use the positive version
                           # since it's faster and doesn't have a false match of 0.
    |
        (?!(x(xx)+)\7*$)   # Test X for being a power of 2. Use the negative version
                           # because the testing of X has to be in a lookahead, and
                           # putting the positive version in a positive lookahead would
                           # be worse golf. It doesn't matter that this can have a false
                           # match of 0, because X is guaranteed never to be 0.
        .*(?=\2$)          # tail = N-X
        (?!(xx+)\9+$)xx    # Test N-X for being prime. We must prevent a false match of
                           # 1 for the reason described above.
    )
)
```
# Regex (ECMAScript + molecular lookahead), ~~53~~ 52 bytes
`^(?!(xx)*$|(?*xx+(((x+)(?=\4$))*x$))\2(?!(xx+)\5+$))`
```
# For the purposes of these comments, the input number = N.
^
# Assert that N is not the sum of a prime number and a power of 2.
(?!
    (xx)*$                   # Assert that N is odd.
|
    (?*
        xx+                  # Force N - \2 to be > 1, because the prime test used
                             # below has a false match of 1, which would otherwise
                             # give us false negatives on de Polignac numbers of the
                             # form 2^M+1, such as 262145 and 2097153.
        (((x+)(?=\4$))*x$)   # Cycle through subtracting all possible powers of 2 from
                             # tail, so we can then test {N - {power of 2}} for being
                             # prime.
                             # \2 = the power of 2
    )
    \2                       # tail = N - \2
    (?!(xx+)\5+$)            # Test tail for being prime. If it matches, this will fail
                             # the outside negative lookahead, showing that N is not a
                             # de Polignac number.
)
```
This version is not only much cleaner, but much faster, because instead of having to cycle through all possible ways that N is the sum of two numbers, it can just cycle through subtracting every power of 2 from N and test the difference for being prime.
The molecular lookahead can be easily converted to a variable-length lookbehind:
# Regex (.NET or ECMAScript 2018), ~~55~~ 54 bytes
`^(?!(xx)*$|xx+(((x+)(?=\4$))*x$)(?<=(?<!^\5+(x+x))\2))`
[Try it online! (.NET)](https://tio.run/##ZVBba9swFH7fr1BCIOfUF@ywC0xVOzB7KLR0LIU9LCtozmkqUGQjyZkap789U@y2LxUIJL7vnO9Su6xuLB2N3JJrZU1s@eQ8bfvOKbNhlaga4xpNfPzfUfD5T9p0WtrvobXknIoEXmvpHNv2zkuvarZr1JrdSGUYYL@TljnxbXq8h8sJhIBns0MICQCEBOFSrD7OEM/CLL7PRbyT@9WnJGIBcbVAPE75aYMVhv6xKE0BXL7s/jpvoyMoU5dfk9n4x2yB6YDftv5kKq@abas0rZGPXKb5Q2NBGc@MKDhoUcUscn2tDAHiRJhOa25Eib16AHNRYJX/ssrTSBhstELny1YrD/Nsjvy0S6XEP8SB9sXHxeJwmEQgv7NPP6R1BO3v4k/adJGK76HXsawcOYSvsjC9MjupY5VWmg19ZX3xPE01ctKOhlrDUMpybGIe5qnCt4j7GFGdC@IqSdKQiAhjdGnzK3cjff0Isd9Tzv27nHtR8jcLg2Z48Yj8eTjHIiu/fC7@Aw "C# (.NET Core) – Try It Online")  
[Try it online! (ECMAScript 2018)](https://tio.run/##TY7BbsIwEER/BSIk7xJiJVG5JJiceuDCoT02RViJCVulTmobsAR8exoqVeKw0khvZna@5FnaylDvIt3VarAizo14U82r7@HdGdINN/KyH3ZQTMF7nM9u3ocA4EOEQpQvM8S5n416Jcab7splODKPWKaIw57blioFySJKEHOjfk5kFDCjZN2SVgx5NWqnNtopc5Cj9Uq6P7msN12lrOXW1aTvyDsN7C@xaMX62oiW274lByximNMBQIuGt0o37ojr9HYju5VbINFLYx/t0HzEn4j/QD0DvU6KJHtgdEfTXYKNPsuW6omRulHZJAjb/NAZyGklVE5hiOPDwAfcqH4cD4T8W7rqCAbx@jS8Ozl@MeQUgC1YqVnGGIaEuRVJfr/jEEdpuox/AQ "JavaScript (Node.js) – Try It Online")
```
# For the purposes of these comments, the input number = N.
^
# Assert that N is not the sum of a prime number and a power of 2.
(?!
    (xx)*$                 # Assert that N is odd.
|
    xx+                    # Force N - \2 to be > 1, because the prime test used
                           # below has a false match of 1, which would otherwise
                           # give us false negatives on de Polignac numbers of the
                           # form 2^M+1, such as 262145 and 2097153.
    (((x+)(?=\4$))*x$)     # Cycle through subtracting all possible powers of 2 from
                           # tail, so we can then test {N - {power of 2}} for being
                           # prime.
                           # \2 = the power of 2
    (?<=
        (?<!^\5+(x+x))     # Test tail for being prime. If it matches, this will fail
                           # the outside negative lookahead, showing that N is not a
                           # de Polignac number.
        \2                 # tail = N - \2
    )
)
```
[Answer]
# Mathematica, 41 bytes
```
OddQ@#&&!Or@@PrimeQ[#-2^Range[0,Log2@#]]&
```
[Answer]
# [PHP](https://php.net/), 75 bytes
prints 1 for truthy and 0 for falsy
```
for($t=1&$argn;0<$d=$n=$argn-2**$i++;$d-1?:$t&=0)for(;--$d&&$n%$d;);echo$t;
```
[Try it online!](https://tio.run/##HctBCoAgFEXReauIeEkaQjbs@3EtkZVNVML9Gzm8B24OuVqXQ@477O8deTAD1Su9Ewob0YwWC8@I3EqvSuGZZ4LXxm0oghf5D6Q1vBCIIzxJOo@QUKjWDw "PHP – Try It Online")
[Try it online! Polignac Integers under 10000](https://tio.run/##Jcw9D4IwEAbgvb/CkJNQPhJqXPRoGAyDiy5uxpDGVmApzVEno38dG7jpvbzPnevdXNWudxtmiEZqybiR/GC75Ne0l@vtfGo4MlDUWRmJ/SFC9hrJqGefkLKdSUQuyjBcTQviH/a2k/EJ@BwGjnPQIculjAWWFdh1KXZpCkOWIehC1EfwsSz5orUEi0UBOo7BbkFjeAN@QXR/rNf4ZY4G69vgKfR/ "PHP – Try It Online")
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 34 bytes
```
n->n%2*prod(i=0,n,!isprime(n-2^i))
```
[Try it online!](https://tio.run/##DYpBCoAwDMC@UgWhkw263edTBEEnPdiV6v9nLzkk0cM43ToaVBiSNlnKqtZP5EpR4sSvGj8XSio7hzBaNxR/c4RMRBE8y@dqhrQ5Gkrw7Qc "Pari/GP – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), ~~15~~ 13 bytes
```
/₂ℕ|>ṗ;?-₍ḃ+1
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/X/9RU9Ojlqk1dg93Tre2133U1PtwR7O24f//hkYWAA)
[Output de Polignac numbers upto 1000.](https://tio.run/##SypKTM6ozMlPN/pvaGBg8Gj@supHbRseNTU96lhe83BXZ@3DrRP@64P4LVNr7B7unG5tr/uoqffhjmZtw///AQ)
Returns `false.` for de Polignac numbers and `true.` otherwise. 
Based on @LeakyNun's deleted answer, with a few bugfixes (posted with their permission). 
*(-2 bytes by using @Jonathan Allan's method to check if the number is a power of two.)*
The given number is not a de Polignac number if: 
```
/₂ℕ              It's an even number
   |>ṗ           Or there exists a prime number less than the input
      ;?-₍       which when subtracted from the input
          ḃ      gives a result that has a binary form
           +     such that the sum of the bits 
            1    is 1
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 13 bytes
```
ÆRạl2=Ḟ$o/o‘Ḃ
```
[Try it online!](https://tio.run/##ASMA3P9qZWxsef//w4ZS4bqhbDI94bieJG8vb@KAmOG4gv///zEyNw "Jelly – Try It Online")
```
ÆRạl2=Ḟ$o/     Main link; argument is z
ÆR             Generate all primes in the range [2..z]
  ạ            Absolute difference with z for each prime
   l2          Logarithm Base 2
     =Ḟ$       For each one, check if it's equal to its floored value (i.e. if it is an integer)
        o/     Reduce by Logical OR to check if any prime plus a power of two equals the z
          o‘Ḃ  Or it's not an odd number. If it's not an odd number, then automatically return 1 (false).
```
Outputs `1` for false and `0` for true.
[Answer]
# [Perl 6](http://perl6.org/), 55 bytes
```
{so$_%2&&$_∉((1,2,4...*>$_) [X+] grep &is-prime,^$_)}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/ujhfJV7VSE1NJf5RR6eGhqGOkY6Jnp6elp1KvKZCdIR2rEJ6UWqBglpmsW5BUWZuqk4cUKL2v7VCcWIlVCpNRyHO1MDA@j8A "Perl 6 – Try It Online")
* `(1, 2, 4 ... * > $_)` is a sequence of the powers of two until the input argument (Perl infers the geometric series from the provided elements).
* `grep &is-prime, ^$_` is the list of prime numbers up to the input argument.
* `[X+]` evaluates the sum of all elements of the cross product of the two series.
I could have done without the `so` for two bytes less, but then it returns two distinct falsy values (`0` and `False`).
[Answer]
# Axiom, 86 bytes
```
f(n:PI):Boolean==(~odd?(n)=>false;d:=1;repeat(n<=d or prime?(n-d)=>break;d:=d*2);n<=d)
```
test and results
```
(21) -> for i in 1..600 repeat if f(i) then output i
   1
   127
   149
   251
   331
   337
   373
   509
   599
```
[Answer]
# Haskell, ~~104~~ 102 bytes
```
p x=[x]==[i|i<-[2..x],x`mod`i<1]
h k|even k=1>2|2>1=notElem k$((+)<$>(2^)<$>[0..k])<*>filter(p)[1..k]
```
**Explanation**
* p is a function that finds prime numbers (very inefficient!)
* Creating a list of `(+)` applied to 2^ partial function which is applied to a list [0..input]
* Applying the above to a list filtered 1 to input for primes
* Resulting cartesian product of every possible value is searched to ensure input does not exist in cartesian product
* Guarded to ensure that an even input is automatically false.
UPDATE: Shout out to Einkorn Enchanter for golfing two bytes!
[Answer]
# Common Lisp, 134 bytes
```
(lambda(x)(flet((p(x)(loop for i from 2 below x always(>(mod x i)0))))(or(evenp x)(do((j 1(* j 2))(m()(p(- x j))))((or(>= j x)m)m)))))
```
Return `NIL` when the argument is a Polignac number, `T` otherwise.
[Try it online!](https://tio.run/##XY3BDsIwDEN/xdrJRULqdmf/UmgnOrVLtVVsXPj1kXLEuSTys/NIcSsnk0jBJCsiplUyLKqgt9Zif4YFXKSCirl8946H4ZRCJUtb/7MD7iHJjgMu7e69cWQWr2c01qgoK8MrLAUa9kLO6HnBjEG9TKOtV6XnH9vg8abmYbJO0xmNgRdQf2ZXUdF9PDqtb@YX)
Ungolfed:
```
(lambda (n)
  (flet ((prime? (x)                 ; x is prime
           loop for i from 2 below x ; if for i in [2..n-1]
           always (> (mod x i) 0)))  ; is x is not divisible by i
    (or (evenp n)                    ; if n is even is not a Polignac number
        (do ((j 1( * j 2))           ; loop with j = 2^i, i = 0, 1,... 
             (m () (prime? (- n j)))); m = n - 2^i is prime?
            ((or (>= j n)            ; terminate if 2^i ≥ n
                 m)                  ; or if n - 2^i is prime
             m)))))                  ; not a polignac if n - 2^i is prime
```
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 12 bytes
```
⍱2∘|⍲0⍭⊢-2*…
```
[Try it online!](https://tio.run/##FY2xagJxDMb3PkXmwsE/@V/IZS6IToL2BYQ7u0jbwaEFB0EQEU50KDg7lC4i7SP4KHmR63dDvuSX5Etm74ui/pwt3l6K5mPZvNZN3cXhazCJ7ZGlsi7aX4ndeRXtX4r2GvtLIY@x/u7m2Ij2gOXROPab@y3H9gSaTp6gz8PRtJvff5hYjLh0EmXKuQ@jbJk0Oak7WWIyNarAlRl5UgSyOnnPDn9ih1SoGBYWzFm4P15miPY9A5YwsApQS37AfxFS@wc "APL (Dyalog Extended) – Try It Online")
Anonymous prefix tacit function. Returns 1 for truthy, 0 for falsy.
Largely based on [ETHProductions' Japt answer](https://codegolf.stackexchange.com/a/129174/74163).
Thanks to @Adám for helping with golfing my original answer, and for making Dyalog Extended for that matter.
### How:
```
⍱2∘|⍲0⍭⊢-2*…   ⍝ Tacit prefix function; input will be called ⍵
           …    ⍝ Inclusive Range [0..⍵]
         2*     ⍝ 2 to the power of each number in the range
       ⊢-       ⍝ Subtract each from ⍵
     0⍭         ⍝ Non-primality check on each resulting number
    ⍲           ⍝ Logical NAND
 2∘|            ⍝ Mod 2
⍱               ⍝ Not any (bitwise OR reduction, then negated)
 
```
[Answer]
# [Python 2](https://docs.python.org/2/), 98 bytes
```
lambda x:not(x%2<1or any((lambda x:x>1and all(x%j for j in range(2,x)))(x-2**i)for i in range(x)))
```
[Try it online!](https://tio.run/##XcrBCsIwDIDhu0@Ri5CMCWvBy1CfxEvGrGbUdJQesqev3UXB6//961ZeSX0N13uN/J5mBhs1FbSjv7iUgXVD/IrdHOsMHGMbFghtWEAUMuvzgb43IkI7@a4T2lF@uFP9a@480HiANYsWlD6gtOcD "Python 2 – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 14 bytes
```
&%Q2!smP-^2dQl
```
[Try it!](https://pyth.herokuapp.com/?code=%26%25Q2%21smP-%5E2dQl&input=128&test_suite=1&test_suite_input=22%0A57%0A3%0A1%0A127%0A149%0A251%0A331%0A337%0A373&debug=0)
[Answer]
# [Julia 0.4](http://julialang.org/), 31 bytes
```
n->n%2*!any(ispow2,n-primes(n))
```
[Try it online!](https://tio.run/##FcpBCoAgAATAe6/YgsBCwTwG9RehBKM20SJ6vdl5Zrt3b7PDhEw1szV9bfkKn8L5GEkVoj/WJNh12Z0RLHEYB611BRTjtVNQooGa0Ui4f1Yrl/wB "Julia 0.4 – Try It Online")
[Answer]
# APL(NARS) 80 chars, 160 bytes
```
∇r←f w;n
r←¯1⋄→0×⍳(w≤0)∨w≥9E9⋄r←0⋄→0×⍳0=2∣w⋄n←r←1
→0×⍳w≤n⋄→3×⍳0πw-n⋄n×←2⋄→2
r←0
∇
```
The function 0π is the function that return its argument is prime or not. For me this function has not be recursive so it is a little more long... Test:
```
  {1=f ⍵:⍵⋄⍬}¨1..1000
1  127  149  251  331  337  373  509  599  701  757  809  877  905  907  959  977  997 
```
for input <=0 or input >=9E9 it return ¯1 (error)
```
  f¨0 ¯1 ¯2 900000000001
¯1 ¯1 ¯1 ¯1 
```
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 107 bytes
```
x=>{var r=Enumerable.Range(2,x);return x%2>0&r.All(p=>r.Any(d=>d<p&p%d<1)|r.All(n=>x!=p+Math.Pow(2,n-2)));}
```
[Try it online!](https://tio.run/##ZY7LDoIwFET3fMV1AWnDmy20iQvdmRA/wKRAK03w0hRQjPrtiLp0dyaTzJl6COtBL3EMxs9O6OwnrAuNY1D1fccVW2bGH1dhwbIdThdpRdXJ6CjwLEkWzDS3cpwswuxmPPFstO06YhhfAe@kYbwpjGfcpkjp81ci4/OGGf8gxjYq@9u6gmFGKc1fS@44qrdS1C35KDVohD9rGqRJklDqAGhFFNFfBCjtentN@fIG "C# (Visual C# Interactive Compiler) – Try It Online")
Not the most efficient code, but seems to work. My [original solution](https://tio.run/##ZU@7DoIwFN35iuuAaQOUx4pt4qCbCXFxMymkSBNszQUUUL8dkcnE7TyS8yiaoGj0FIZw85KzcfadKTbatH5ubS1KPvVcPO8SAfnOdFeFMq8VO0pzUSTxe5qiajs00LuJiNbITpVCRQYukG3rmoxcjIIPr8EdRUTpov2a/YoP3kG2FcvsYw4cg4RSmr6n1HFKi0oWFfm2a9AG/gbEfhxFc6wDoEtSEr1AgAznBzNLpw8) filtered for primes before testing them in the formula and it performed much better. The current version is 11 bytes shorter.
```
// input x is an integer
x=>{
  // we need to generate several
  // ranges. since this is verbose,
  // generate 1 and keep a reference
  var r=Enumerable.Range(2,x);
  // this is the main condition
  return
     // input must be odd
     x%2>0&
     // generate all possible p's
     // over our range and ensure that
     // they satisfy the following
     r.All(p=>
       // either p is not prime
       r.Any(d=>d<p&p%d<1)
       |
       // or there is no n that satisfies
       // the formula: x=p+2^n
       r.All(n=>x!=p+Math.Pow(2,n-2))
     );
}
```
]