OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
17 and its reversal 71 are both Chen primes.
MAPLE
revdigs:= proc(n) local L, k;
L:= convert(n, base, 10);
add(L[-k]*10^(k-1), k=1..nops(L))
end proc:
filter:= proc(n) local r;
if not isprime(n) then return false fi;
r:= revdigs(n);
isprime(r) and numtheory:-bigomega(n+2) <= 2 and numtheory:-bigomega(r+2) <= 2
end proc:
select(filter, [2, seq(i, i=3..2000, 2)]); # Robert Israel, Jun 16 2020
MATHEMATICA
cpQ[n_]:=Module[{rev=FromDigits[Reverse[IntegerDigits[n]]]}, PrimeOmega[ n+2]<3 && PrimeQ[rev]&&PrimeOmega[rev+2]<3]; Select[Prime[ Range[ 400]], cpQ] (* Harvey P. Dale, Jul 17 2011 *)
CROSSREFS
KEYWORD
base,nonn,less
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 21 2006
EXTENSIONS
Corrected by Harvey P. Dale, Jul 17 2011
STATUS
approved