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.

A214705 Primes that contain only the digits (2, 5, 7).

Original entry on oeis.org

2, 5, 7, 227, 257, 277, 557, 577, 727, 757, 2557, 2777, 5227, 5527, 5557, 7577, 7727, 7757, 22277, 22727, 22777, 25577, 27277, 27527, 52727, 52757, 57527, 57557, 57727, 72227, 72277, 72577, 72727, 75227, 75277, 75527, 75557, 75577, 77527, 77557, 222527, 222557
Offset: 1

Views

Author

Vincenzo Librandi, Jul 28 2012

Keywords

Comments

The digits are prime numbers.

Crossrefs

Subsequence of A019546.

Programs

  • Magma
    [p: p in PrimesUpTo(100000) | Set(Intseq(p)) subset [2,5,7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{2,5,7},n],PrimeQ],{n,6}]]
  • Python
    from sympy import primerange
    def ok(p): return set(str(p)) <= set("257")
    def aupto(limit): return [p for p in primerange(2, limit+1) if ok(p)]
    print(aupto(222557)) # Michael S. Branicky, Feb 05 2021