login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068690 Primes such that all digits (except perhaps the least significant digit) are even. 12
2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 223, 227, 229, 241, 263, 269, 281, 283, 401, 409, 421, 443, 449, 461, 463, 467, 487, 601, 607, 641, 643, 647, 661, 683, 809, 821, 823, 827, 829, 863, 881, 883, 887, 2003, 2027, 2029, 2063, 2069, 2081, 2083, 2087 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Essentially the same as A154764.

LINKS

Zak Seidov, Table of n, a(n) for n = 1..10775 (all terms < 10^8.)

EXAMPLE

2 is in the sequence even though the least significant digit of 2 is even instead of odd. - David A. Corneth, Sep 18 2019

MATHEMATICA

(*returns true if all but the last digit of n is even, false o.w.*) f[n_] := Module[{a, l, i, r = True}, a = IntegerDigits[n]; l = Length[a]; For[i = 1, i < l, i++, If[Mod[a[[i]], 2] == 1, r = False; Break[ ]]]; r]; Select[Range[1, 4*10^3], PrimeQ[ # ] && f[ # ] &]

m = 7; Prepend[Reap[Do[If[PrimeQ[fd = FromDigits[{a[1], a[2], a[3], a[4], a[5], a[6], a[m]}]], Sow[fd]], {a[1], 0, 8, 2}, {a[2], 0, 8, 2}, {a[3], 0, 8, 2}, {a[4], 0, 8, 2}, {a[5], 0, 8, 2}, {a[6], 0, 8, 2}, {a[m], 1, 9, 2}]][[2, 1]], 2] (* all terms < 10^8. Zak Seidov, Jan 29 2013 *)

Select[ Prime@ Range[10000], ContainsAll[{0, 2, 4, 6, 8}, Most@ IntegerDigits[#]] &] (* From version 10. Mikk Heidemaa, Feb 08 2016 *)

Select[Prime[Range[400]], AllTrue[Most[IntegerDigits[#]], EvenQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 18 2019 *)

PROG

(Haskell)

a068690 n = a068690_list !! (n-1)

a068690_list = filter (all (`elem` "02468") . init . show) a000040_list

-- Reinhard Zumkeller, Apr 28 2014

CROSSREFS

Cf. A030096, A154764.

Sequence in context: A323578 A156756 A225659 * A069556 A210110 A235144

Adjacent sequences:  A068687 A068688 A068689 * A068691 A068692 A068693

KEYWORD

base,easy,nonn

AUTHOR

Amarnath Murthy and Joseph L. Pe, Mar 03 2002

EXTENSIONS

Definition rephrased by N. J. A. Sloane, Dec 11 2007

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 10:31 EDT 2021. Contains 347654 sequences. (Running on oeis4.)