OFFSET
1,1
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 47 is a term because 47 and 74/2 = 37 are primes.
MAPLE
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
filter:= proc(n) isprime(n) and numtheory:-bigomega(revdigs(n))=2 end proc:
select(filter, [seq(seq(seq(i*10^d+j, j=1..10^d-1, 2), i=2..8, 2), d=1..4)]);
PROG
(PARI) isok(p) = if (isprime(p), my(r=fromdigits(Vecrev(digits(p)))); if (!(r%2), isprime(r/2))); \\ Michel Marcus, Jun 15 2021
(Python) from sympy import isprime, primerange
def ok(p): t = int(str(p)[::-1]); return t%2 == 0 and isprime(t//2)
print(list(filter(ok, primerange(1, 2838)))) # Michael S. Branicky, Jun 16 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jun 14 2021
STATUS
approved