login
A247052
Primes composed of only digits with line segments or both line segments and curves {1, 2, 4, 5, 7}.
2
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,1
COMMENTS
Intersection of A000040 and A082741.
LINKS
EXAMPLE
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.
MATHEMATICA
Select[Prime[Range[500]], Intersection[IntegerDigits[#], {0, 3, 6, 8, 9}] == {} &]
PROG
(Python)
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(int(s), end=', ') # Derek Orr, Sep 18 2014
(Magma) [NthPrime(n): n in [1..400] | Set(Intseq(NthPrime(n))) subset [1, 2, 4, 5, 7] ]; // Vincenzo Librandi, Sep 19 2014
CROSSREFS
Sequence in context: A045349 A338339 A224320 * A364649 A163695 A134641
KEYWORD
nonn,base,less
AUTHOR
K. D. Bajpai, Sep 10 2014
STATUS
approved