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.
%I A199340 #23 Jul 14 2025 17:30:52 %S A199340 3,43,433,443,3343,3433,4003,30403,33343,33403,34033,34303,34403, %T A199340 40343,40433,43003,43403,300043,300343,304033,304303,304433,330433, %U A199340 333433,334043,334333,334403,343303,343333,343433,400033,403003,403043,403433,430303,430333 %N A199340 Primes having only {0, 3, 4} as digits. %C A199340 All terms end in '3'. This could be used to speed up the given program. %C A199340 A020461 is a subsequence. - _Vincenzo Librandi_, Jul 23 2015 %H A199340 Alois P. Heinz, <a href="/A199340/b199340.txt">Table of n, a(n) for n = 1..10000</a> %H A199340 <a href="/index/Pri#PrimesWithDigits">Index to entries about primes with digits in a given set</a>. %t A199340 Select[Prime[Range[5 10^4]], Complement[IntegerDigits[#], {3, 4, 0}]=={} &] (* _Vincenzo Librandi_, Jul 23 2015 *) %t A199340 Select[FromDigits/@Tuples[{0,3,4},6],PrimeQ] (* _Harvey P. Dale_, Mar 21 2020 *) %t A199340 Select[10#+3&/@FromDigits/@Tuples[{0,3,4},5],PrimeQ] (* _Harvey P. Dale_, May 02 2022 *) %o A199340 (PARI) a(n, list=0, L=[0, 3, 4], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u)||next; reqpal && !isprime(A004086(t)) && next; list && print1(t", "); n--||return(t)))} \\ Syntax updated for current PARI version. - _M. F. Hasler_, Jul 25 2015 %o A199340 (Magma) [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [3, 4, 0]]; // _Vincenzo Librandi_, Jul 23 2015 %o A199340 (PARI) {forprime(p=3,1e6,p%10==3&&!setminus(Set(digits(p)),[3,4])&&print1(p","))} \\ [0] evaluates to false. - _M. F. Hasler_, Jul 25 2015 %Y A199340 Cf. Primes that contain only the digits (3,4,k): this sequence (k=0), A199341 (k=1), A199342 (k=2), A199345 (k=5), A199346 (k=6), A199347 (k=7), A199348 (k=8), A199349 (k=9). %Y A199340 Cf. A020449 - A020472, A199325 - A199329. %Y A199340 Cf. A058429, A058430. %K A199340 nonn,base %O A199340 1,1 %A A199340 _M. F. Hasler_, Nov 05 2011