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.

A245657 Primes p for which none of the concatenations p3, p9, 3p, 9p are primes.

Original entry on oeis.org

3, 107, 113, 179, 317, 443, 487, 599, 641, 653, 751, 773, 937, 977, 991, 1021, 1087, 1103, 1187, 1201, 1213, 1217, 1301, 1409, 1427, 1439, 1483, 1553, 1559, 1579, 1609, 1637, 1693, 1747, 1777, 1787, 1789, 1861, 1949, 1987, 1993, 2081, 2129, 2239, 2281, 2287, 2293, 2351, 2393, 2477
Offset: 1

Views

Author

Vladimir Shevelev, Sep 13 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[400]],NoneTrue[{10#+3,10#+9,3*10^IntegerLength[#]+#, 9*10^IntegerLength[ #]+#},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 06 2020 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (!isprime(eval(concat(Str(p), Str(3)))) && ! isprime(eval(concat(Str(p), Str(9)))) && ! isprime(eval(concat(Str(3), Str(p)))) && ! isprime(eval(concat(Str(9), Str(p)))), print1(p, ", ")););} \\ Michel Marcus, Sep 14 2014
    
  • Python
    import sympy
    from sympy import isprime
    from sympy import prime
    for n in range(1,10**3):
      p = str(prime(n))
      if not isprime(int(p+'3')) and not isprime(int(p+'9')) and not isprime(int('3'+p)) and not isprime(int('9'+p)):
        print(int(p),end=', ') # Derek Orr, Sep 16 2014

Extensions

More terms from Derek Orr, Sep 16 2014