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.

A155762 Prime numbers p such that prepending any single decimal digit to p does not produce a prime.

Original entry on oeis.org

2, 5, 149, 401, 509, 773, 809, 1021, 1103, 1289, 1301, 1451, 1697, 1709, 1747, 1877, 1889, 2087, 2389, 2521, 2663, 3373, 3511, 3631, 3733, 3779, 3821, 3919, 3947, 3989, 4003, 4073, 4241, 4289, 4339, 4637, 4643, 4801, 4931, 5039, 5113, 5387, 5417, 5477
Offset: 1

Views

Author

Dmitry Kamenetsky, Jan 26 2009

Keywords

Comments

149 is in the sequence, because the following numbers are all composite: 1149, 2149, 3149, 4149, 5149, 6149, 7149, 8149 and 9149.

Crossrefs

Cf. A119289.

Programs

  • Mathematica
    Select[Prime@Range@1000, NoneTrue[#+10^IntegerLength@#*Range@9, PrimeQ]&] (* Hans Rudolf Widmer, May 28 2022 *)
  • Python
    from sympy import isprime, primerange
    def ok(p): return not any(isprime(int(d+str(p))) for d in "123456789")
    print(list(filter(isprime, primerange(2, 5500)))) # Michael S. Branicky, May 28 2022