cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A036939 #17 Mar 09 2020 12:27:07
%S A036939 2,29,229,2999,22229,0,2222929,22229299,222229229,2222229299,
%T A036939 22222229299,0,2222222229229,22222222222229,222222222229229,
%U A036939 2222222222229299,22222222222922299,0,2222222222222292929
%N A036939 Smallest n-digit prime containing only digits 2 and 9, or 0 if no such prime exists.
%C A036939 a(6k) = 0 as any 6k-digit number containing only digits 2 or 9 is divisible by 7. - _Jinyuan Wang_, Mar 09 2020
%H A036939 Jinyuan Wang, <a href="/A036939/b036939.txt">Table of n, a(n) for n = 1..500</a>
%t A036939 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 A036939 Cf. A020460, A036229, A036313.
%K A036939 nonn,base
%O A036939 1,1
%A A036939 _Patrick De Geest_, Jan 04 1999