OFFSET
1,1
COMMENTS
Primes whose reversal is an even integer.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
43 is a term because 43 is prime and 34 is an even number.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 20 2022
STATUS
approved