A355430 Primes starting with an even decimal digit.
2, 23, 29, 41, 43, 47, 61, 67, 83, 89, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 809, 811, 821
Offset: 1
Examples
43 is a term because 43 is prime and 34 is an even number.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
imax=142; a={}; For[i=1, i<=imax, i++, If[EvenQ[FromDigits[Reverse[IntegerDigits[Prime[i]]]]], AppendTo[a,Prime[i]]]]; a (* Stefano Spezia, Jul 20 2022 *) Select[Prime[Range[200]],EvenQ[IntegerDigits[#][[1]]]&] (* Harvey P. Dale, May 18 2025 *)
-
PARI
isok(k) = isprime(k) && !(fromdigits(Vecrev(digits(k))) % 2); \\ Michel Marcus, Jul 20 2022
-
Python
from sympy import isprime def ok(n): return str(n)[0] in "2468" and isprime(n) print([k for k in range(822) if ok(k)]) # Michael S. Branicky, Jul 25 2022
-
Python
from sympy import isprime from itertools import chain, count, islice, product def agen(): yield from chain((2,), (t for t in (b+i for d in count(1) for b in range(2*10**d, 10*10**d, 2*10**d) for i in range(1, 10**d, 2)) if isprime(t))) print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 25 2022
Comments