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!)
A068692 Largest n-digit prime with all even digits except for the least significant digit. 3
7, 89, 887, 8887, 88883, 888887, 8888861, 88888883, 888888887, 8888888809, 88888888801, 888888888887, 8888888888849, 88888888888889, 888888888888883, 8888888888888647, 88888888888888889, 888888888888888809 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
for n from 1 to 40 do a := prevprime((10^n-1)/9*8+2):b := convert(a, base, 10):c := true:for i from 2 to nops(b) do if((b[i] mod 2)>0) then c := false:end if:end do:while(c=false) do a := prevprime(a):b := convert(a, base, 10):c := true:for i from 2 to nops(b) do if((b[i] mod 2)>0) then c := false:end if:end do:end do:q[n] := a:end do:seq(q[k], k=1..40);
MATHEMATICA
nped[n_]:=Module[{p=NextPrime[9*10^n, -1]}, While[AnyTrue[Most[ IntegerDigits[ p]], OddQ], p=NextPrime[p, -1]]; p]; Array[nped, 20, 0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2018 *)
CROSSREFS
Sequence in context: A071363 A174616 A089394 * A178006 A053302 A068877
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Mar 03 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 26 2002
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 March 28 21:57 EDT 2024. Contains 371254 sequences. (Running on oeis4.)