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!)
A036945 Smallest n-digit prime containing only the digits 4 and 9, or 0 if no such prime exists. 1
0, 0, 449, 4999, 44449, 444449, 4444949, 44444999, 444499949, 4444444999, 44444449949, 444444494449, 4444449444949, 44444444449499, 444444444499499, 4444444444444999, 44444444444444999, 444444444449449949 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
44449 is the least prime of 5 digits containing just digits 4 and 9 so a(5) = 44449. - David A. Corneth, Oct 10 2019
MATHEMATICA
Join[{0, 0}, Table[SelectFirst[10*FromDigits[#]+9&/@Tuples[{4, 9}, n], PrimeQ], {n, 2, 20}]] (* Harvey P. Dale, Aug 20 2021 *)
PROG
(PARI) a(n) = my(s=4*(10^(n)-1)/9); forstep(i=1, 2^n-1, 2, fr = fromdigits(5 * binary(i)) + s; if(isprime(fr), return(fr))); 0 \\ David A. Corneth, Oct 10 2019
CROSSREFS
Sequence in context: A160291 A193255 A283791 * A201182 A012169 A093402
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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)