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
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