The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A020451 Primes that contain digits 1 and 3 only. 9
 3, 11, 13, 31, 113, 131, 311, 313, 331, 3313, 3331, 11113, 11131, 11311, 13313, 13331, 31333, 33113, 33311, 33331, 113111, 113131, 131111, 131113, 131311, 311111, 313133, 313331, 313333, 331333, 333131, 333331, 1111333, 1131113, 1131131, 1131133, 1131331 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Vincenzo Librandi, Table of n, a(n) for n = 1..1000 MAPLE N:= 8: # to get all a(n) with at most N digits S:= {}: for d from 1 to N do r:= (10^d-1)/9; S:= S union select(isprime, map(`+`, map(convert, combinat[powerset] ({seq(2*10^i, i=0..d-1)}), `+`), r)); od: S; # if using Maple 11 or earlier, uncomment the next line # sort(convert(S, list)); # Robert Israel, May 04 2015 MATHEMATICA Flatten[Table[Select[FromDigits/@Tuples[{1, 3}, n], PrimeQ], {n, 7}]] (* Vincenzo Librandi, Jul 27 2012 *) PROG (Magma) [p: p in PrimesUpTo(1131331) | Set(Intseq(p)) subset [1, 3]]; // Bruno Berselli, Jul 27 2012 (Python) from sympy import primerange def checkd(a, c): b = set(int(i) for i in set(str(a))) return b.issubset(c) for n in primerange(2, 2000000): if checkd(n, [1, 3]): print(n) # Abhiram R Devesh, May 04 2015 CROSSREFS Subsequence of A045429. Subsequence of A032917. Sequence in context: A260044 A199303 A244047 * A018450 A302304 A119145 Adjacent sequences: A020448 A020449 A020450 * A020452 A020453 A020454 KEYWORD nonn,base AUTHOR David W. Wilson STATUS approved

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

Last modified June 15 19:43 EDT 2024. Contains 373410 sequences. (Running on oeis4.)