login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199325 Primes with digits '0', '1' and '5' only. 25
5, 11, 101, 151, 1051, 1151, 1511, 5011, 5051, 5101, 5501, 10111, 10151, 10501, 11551, 15101, 15511, 15551, 50051, 50101, 50111, 50551, 51001, 51151, 51511, 51551, 55001, 55051, 55501, 55511, 100151, 100501, 100511, 101051, 101111, 101501, 110051, 110501, 115001, 115151, 150001, 150011, 150151, 150551 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

Index to entries about primes with digits in a given set

MAPLE

N:= 10000: # to get the first N terms

count:= 0:

allowed:= {0, 1, 5}:

nallowed:= nops(allowed):

subst:= seq(i=allowed[i+1], i=0..nallowed-1):

for d from 0 while count < N do

  for x1 from 1 to nallowed-1 while count < N do

    for t from 0 to nallowed^d-1 while count < N do

      L:= subs(subst, convert(x1*nallowed^d+t, base, nallowed));

      X:= add(L[i]*10^(i-1), i=1..d+1);

      if isprime(X) then

          count:= count+1;

          A[count]:= X;

      fi

od od od:

seq(A[n], n=1..N); # Robert Israel, Apr 20 2014

MATHEMATICA

Select[FromDigits/@Tuples[{0, 1, 5}, 6], PrimeQ] (* Harvey P. Dale, Jul 23 2021 *)

PROG

(PARI) L=[0, 1, 5]; for(d=1, 6, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1 & !L[1]), #L]), ispseudoprime(t=vector(d, i, L[v[i]])*u)&print1(t", ")))  /* see A199327 for a function a(n) */

(MAGMA) [p: p in PrimesUpTo(160000) | Set(Intseq(p)) subset [0, 1, 5]]; // Vincenzo Librandi, Apr 22 2014

CROSSREFS

Cf. A020449 - A020472, A199326 - A199329, A061247, A199340 - A199349.

Sequence in context: A053778 A030079 A066596 * A199305 A096473 A007530

Adjacent sequences:  A199322 A199323 A199324 * A199326 A199327 A199328

KEYWORD

nonn,base

AUTHOR

M. F. Hasler, Nov 05 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 17:12 EST 2021. Contains 349582 sequences. (Running on oeis4.)