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!)
A036939 Smallest n-digit prime containing only digits 2 and 9, or 0 if no such prime exists. 1

%I #17 Mar 09 2020 12:27:07

%S 2,29,229,2999,22229,0,2222929,22229299,222229229,2222229299,

%T 22222229299,0,2222222229229,22222222222229,222222222229229,

%U 2222222222229299,22222222222922299,0,2222222222222292929

%N Smallest n-digit prime containing only digits 2 and 9, or 0 if no such prime exists.

%C a(6k) = 0 as any 6k-digit number containing only digits 2 or 9 is divisible by 7. - _Jinyuan Wang_, Mar 09 2020

%H Jinyuan Wang, <a href="/A036939/b036939.txt">Table of n, a(n) for n = 1..500</a>

%t Join[{2},Table[Min[Select[FromDigits/@(Join[#,{9}]&/@Tuples[{2,9},n]), IntegerLength[#]==n+1&&PrimeQ[#]&]],{n,20}]]/.\[Infinity]->0 (* _Harvey P. Dale_, Nov 08 2011 *)

%Y Cf. A020460, A036229, A036313.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Jan 04 1999

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 23 14:15 EDT 2024. Contains 371914 sequences. (Running on oeis4.)