login
A137238
Primes which contain the digit 1 or the digit 2.
1
2, 11, 13, 17, 19, 23, 29, 31, 41, 61, 71, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 311, 313, 317, 331, 401, 419
OFFSET
1,1
EXAMPLE
2 and 11 are primes which contain either the digit 1 or the digit 2.
MAPLE
a:=proc(n) local nn: nn:=convert(convert(n, base, 10), set): if isprime(n) = true and 0 < nops(`intersect`({1, 2}, nn)) then n else end if end proc: seq(a(n), n=1..400); # Emeric Deutsch, Mar 31 2008
MATHEMATICA
Select[Prime[Range[100]], DigitCount[ # ][[1]] + DigitCount[ # ][[2]] > 0 &] (* Stefan Steinerberger, Mar 16 2008 *)
CROSSREFS
Cf. A133765.
Sequence in context: A048867 A113626 A154539 * A048521 A172071 A058048
KEYWORD
nonn,base,easy
AUTHOR
Parthasarathy Nambi, Mar 08 2008
EXTENSIONS
Corrected and extended by Stefan Steinerberger and Emeric Deutsch, Mar 16 2008
STATUS
approved