OFFSET
1,1
LINKS
Chris Caldwell, The First 1,000 Prime.
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
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