login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A137238 Primes which contain the digit 1 or the digit 2. 1

%I #7 Apr 03 2023 10:36:11

%S 2,11,13,17,19,23,29,31,41,61,71,101,103,107,109,113,127,131,137,139,

%T 149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,

%U 239,241,251,257,263,269,271,277,281,283,293,311,313,317,331,401,419

%N Primes which contain the digit 1 or the digit 2.

%H Chris Caldwell, <a href="https://t5k.org/lists/small/1000.txt">The First 1,000 Prime</a>.

%e 2 and 11 are primes which contain either the digit 1 or the digit 2.

%p 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

%t Select[Prime[Range[100]], DigitCount[ # ][[1]] + DigitCount[ # ][[2]] > 0 &] (* _Stefan Steinerberger_, Mar 16 2008 *)

%Y Cf. A133765.

%K nonn,base,easy

%O 1,1

%A _Parthasarathy Nambi_, Mar 08 2008

%E Corrected and extended by _Stefan Steinerberger_ and _Emeric Deutsch_, Mar 16 2008

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 21:46 EDT 2024. Contains 371781 sequences. (Running on oeis4.)