Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Sep 08 2022 08:46:09
%S 2,5,7,11,17,41,47,71,127,151,157,211,227,241,251,257,271,277,421,457,
%T 521,541,547,557,571,577,727,751,757,1117,1151,1171,1217,1277,1427,
%U 1447,1451,1471,1511,1571,1721,1741,1747,1777,2111,2141,2221,2251,2411,2417
%N Primes composed of only digits with line segments or both line segments and curves {1, 2, 4, 5, 7}.
%C Intersection of A000040 and A082741.
%H K. D. Bajpai, <a href="/A247052/b247052.txt">Table of n, a(n) for n = 1..15000</a>
%e 127 is in the sequence because it is prime and composed of digits 1, 2 and 7 only.
%e 1427 is in the sequence because it is prime and composed of digits 1, 2, 4 and 7 only.
%e a(129) = 12457 is the smallest prime using all the digits 1, 2, 4, 5 and 7 only once.
%t Select[Prime[Range[500]], Intersection[IntegerDigits[#], {0, 3, 6, 8, 9}] == {} &]
%o (Python)
%o for n in range(1,10**3):
%o ..s = str(prime(n))
%o ..if not (s.count('0') + s.count('3') + s.count('6') + s.count('8') + s.count('9')):
%o ....print(int(s),end=', ') # _Derek Orr_, Sep 18 2014
%o (Magma) [NthPrime(n): n in [1..400] | Set(Intseq(NthPrime(n))) subset [1,2,4,5,7] ]; // _Vincenzo Librandi_, Sep 19 2014
%Y Cf. A000040, A082741.
%K nonn,base,less
%O 1,1
%A _K. D. Bajpai_, Sep 10 2014