cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A089377 Numbers whose product of digits +1 and -1 gives twin prime pairs.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Nov 08 2003

Keywords

Examples

			36 is a member since 3*6 = 18 and (17,19) is a twin prime pair.
		

Crossrefs

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