|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|