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.

Showing 1-2 of 2 results.

A059694 Primes p such that 1p1, 3p3, 7p7 and 9p9 are all primes.

Original entry on oeis.org

53, 2477, 4547, 5009, 7499, 8831, 9839, 11027, 24821, 26393, 29921, 36833, 46073, 46769, 47711, 49307, 53069, 59621, 64283, 66041, 79901, 84017, 93263, 115679, 133103, 151121, 169523, 197651, 207017, 236807, 239231, 255191, 259949, 265271, 270071, 300431, 330047
Offset: 1

Views

Author

Patrick De Geest, Feb 07 2001

Keywords

Comments

All terms == 1 (mod 6). The sequence is apparently infinite. There are 16486 terms up to 10^9. - Zak Seidov, Jan 17 2014
Intersection of A069687, A069688, A069689, and A069690. - Zak Seidov, Jan 17 2014

Examples

			53 is a term because 1531, 3533, 7537 and 9539 are primes.
		

Crossrefs

Programs

  • Python
    from sympy import isprime, nextprime
    from itertools import islice
    def agen(): # generator of terms
        p = 2
        while True:
            sp = str(p)
            if all(isprime(int(d+sp+d)) for d in "1379"):
                yield p
            p = nextprime(p)
    print(list(islice(agen(), 40))) # Michael S. Branicky, Feb 23 2023

A059677 Numbers n such that 1n1, 3n3, 7n7 and 9n9 are all primes.

Original entry on oeis.org

20, 53, 341, 536, 2312, 2477, 3380, 3665, 3686, 4547, 5009, 5105, 6458, 6488, 6731, 6845, 7499, 7508, 7562, 7835, 8411, 8831, 9032, 9386, 9764, 9839, 11027, 11885, 14990, 19589, 20498, 21080, 22844, 24821, 25220, 26393, 27593, 29864, 29921
Offset: 1

Views

Author

Harvey P. Dale, Feb 05 2001

Keywords

Examples

			2312 is a term because 123121, 323123, 723127 and 923129 are all primes.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 30000 ], PrimeQ[ ToExpression[ StringInsert[ ToString[ # ], "1", {1, -1} ] ] ] && PrimeQ[ ToExpression[ StringInsert[ ToString[ # ], "3", {1, -1} ] ] ] && PrimeQ[ ToExpression[ StringInsert[ ToString[ # ], "7", {1, -1} ] ] ] && PrimeQ[ ToExpression[ StringInsert[ ToString[ # ], "9", {1, -1} ] ] ] & ]
    enclose[n_]:=Table[FromDigits[Join[{i},IntegerDigits[n],{i}]],{i, {1,3,7,9}}]; Select[Range[30000],AllTrue[enclose[#],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 21 2015 *)

Extensions

More terms from Patrick De Geest, Feb 07 2001
Showing 1-2 of 2 results.