login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020449 Primes that contain digits 0 and 1 only. 121
11, 101, 10111, 101111, 1011001, 1100101, 10010101, 10011101, 10100011, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101, 100100111, 100111001, 101001001, 101001011, 101100011, 101101111, 101111011, 101111111 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Primes which are the sums of distinct powers of 10. - Amarnath Murthy, Nov 19 2002

Subsequence of A007088. - Michel Marcus, Dec 18 2015

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000

Index to entries for primes with digits in a given set

MAPLE

N:= 10: # to get all entries with <= N digits

S:= {}:

for d from 1 to N-1 do

  S:= S union select(isprime, map(`+`, map(convert, combinat[powerset]({seq(10^i, i=0..d-1)}), `+`), 10^d));

od:

S; # if using Maple 11 or earlier, uncomment the next line

# sort(convert(%, list)); # Robert Israel, May 04 2015

MATHEMATICA

Flatten[Table[Select[FromDigits/@Tuples[{0, 1}, n], PrimeQ], {n, 9}]] (* Vincenzo Librandi, Jul 27 2012 *)

PROG

(MAGMA) [p: p in PrimesUpTo(101111111) | Set(Intseq(p)) subset [0, 1]]; // Vincenzo Librandi, Jul 27 2012

(PARI) is(n)=isprime(n)&&vecmax(digits(n))==1 \\ Charles R Greathouse IV, Jul 01 2013

(Python)

import sympy

def check10(a):

....b=[int(i) for i in list(set(list(str(a))))]

....return(set(b).issubset(c))

n=2

while n>1:

....if check10(n)==True:

........print(n)

....n=sympy.nextprime(n) \\ Abhiram R Devesh, May 04 2015

(Python)

from sympy import isprime

A020449_list = [n for n in (int(format(m, 'b')) for m in range(1, 2**10)) if isprime(n)] # Chai Wah Wu, Dec 17 2015

CROSSREFS

Cf. A007088, A036952.

Sequence in context: A064490 A080439 A098153 * A089971 A082620 A199304

Adjacent sequences:  A020446 A020447 A020448 * A020450 A020451 A020452

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 20 11:34 EDT 2017. Contains 290835 sequences.