A089377 Numbers whose product of digits +1 and -1 gives twin prime pairs.
4, 6, 14, 16, 22, 23, 26, 29, 32, 34, 36, 41, 43, 56, 61, 62, 63, 65, 67, 76, 89, 92, 98, 114, 116, 122, 123, 126, 129, 132, 134, 136, 141, 143, 156, 161, 162, 163, 165, 167, 176, 189, 192, 198, 212, 213, 216, 219, 221, 223, 231, 232, 233, 235, 237, 249, 253, 256
Offset: 1
Examples
36 is a member since 3*6 = 18 and (17,19) is a twin prime pair.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
prodDig[n_] := Times @@ IntegerDigits[n]; Select[Range[256], And @@ PrimeQ [prodDig[#] + {-1, 1}] &] (* Amiram Eldar, Dec 27 2019 *) Select[Range[300],AllTrue[Times@@IntegerDigits[#]+{1,-1},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 26 2021 *)
Extensions
More terms from David Wasserman, Sep 15 2005