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!)
A036941 Smallest n-digit prime containing only digits 3 and 5, or 0 if no such prime exists. 1
3, 53, 353, 3533, 33353, 333533, 3335533, 33335333, 333535333, 3333353533, 33333353533, 333333533353, 3333333353353, 33333333555553, 333333333353353, 3333333333333533, 33333333333355333, 333333333333353533 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
A:= proc(n) local j, x, t;
x:= (10^n-1)/3;
for t from 1 to 2^n do
if isprime(x) then return x fi;
j:= padic:-ordp(t, 2);
x:= x - (x mod 10^j) + (7 * 10^j-1)/3;
od:
0
end proc:
seq(A(n), n=1..100); # Robert Israel, Apr 22 2016
MATHEMATICA
Table[SelectFirst[FromDigits/@(Join[#, {3}]&/@Tuples[{3, 5}, n]), PrimeQ], {n, 0, 20}](* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Oct 07 2014 *)
CROSSREFS
Sequence in context: A141929 A216042 A292530 * A215435 A121504 A099665
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 04 1999
STATUS
approved

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 August 9 16:51 EDT 2024. Contains 375044 sequences. (Running on oeis4.)