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.

A247052 Primes composed of only digits with line segments or both line segments and curves {1, 2, 4, 5, 7}.

Original entry on oeis.org

2, 5, 7, 11, 17, 41, 47, 71, 127, 151, 157, 211, 227, 241, 251, 257, 271, 277, 421, 457, 521, 541, 547, 557, 571, 577, 727, 751, 757, 1117, 1151, 1171, 1217, 1277, 1427, 1447, 1451, 1471, 1511, 1571, 1721, 1741, 1747, 1777, 2111, 2141, 2221, 2251, 2411, 2417
Offset: 1

Views

Author

K. D. Bajpai, Sep 10 2014

Keywords

Comments

Intersection of A000040 and A082741.

Examples

			127 is in the sequence because it is prime and composed of digits 1, 2 and 7 only.
1427 is in the sequence because it is prime and composed of digits 1, 2, 4 and 7 only.
a(129) = 12457 is the smallest prime using all the digits 1, 2, 4, 5 and 7 only once.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..400] | Set(Intseq(NthPrime(n))) subset [1,2,4,5,7] ]; // Vincenzo Librandi, Sep 19 2014
  • Mathematica
    Select[Prime[Range[500]], Intersection[IntegerDigits[#], {0, 3, 6, 8, 9}] == {} &]
  • Python
    from sympy import prime
    for n in range(1,10**3):
      s = str(prime(n))
      if not (s.count('0') + s.count('3') + s.count('6') + s.count('8') + s.count('9')):
        print(s,end=', ') # Derek Orr, Sep 18 2014