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.

A068692 Largest n-digit prime with all even digits except for the least significant digit.

Original entry on oeis.org

7, 89, 887, 8887, 88883, 888887, 8888861, 88888883, 888888887, 8888888809, 88888888801, 888888888887, 8888888888849, 88888888888889, 888888888888883, 8888888888888647, 88888888888888889, 888888888888888809, 8888888888888888881, 88888888888888888867, 888888888888888888683
Offset: 1

Views

Author

Amarnath Murthy, Mar 03 2002

Keywords

Crossrefs

Programs

  • 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 *)

Extensions

More terms from Sascha Kurz, Mar 26 2002
More terms from Robert Israel, Jul 02 2025