OFFSET
1,1
MAPLE
# Check if number is Chen prime ischenprime:=proc(n); if (isprime(n) = 'true') then if (isprime(n+2) = 'true' or numtheory[bigomega](n+2) = 2) then return 'true' else return 'false' fi fi end: #Reverse digits obrni_stev:=proc(n) local i, tren, tren1, st, ans; ans:=[ ]: tren:=n: tren1:=0: for i while (tren>0) do st:=round(10*frac(tren/10)): ans:=[op(ans), st]: tren:=trunc(tren/10): od: for i from 0 to nops(ans)-1 do tren1:= tren1 + op(nops(ans)-i, ans)*10^(i): od: return tren1 end: ts_inv_chen_pra:= proc(n) local i, trens, ans; trens:= [ ]; ans:=[ ]; for i from 1 to n do if (ischenprime( i ) = 'true') then ans:=[op(ans), obrni_stev(i)] fi: od: return ans end: ts_inv_chen_pra(2000);
MATHEMATICA
psp=Take[Union[Join[Union[Times@@@Tuples[Prime[Range[100]], {2}]], Prime[Range[PrimePi[250000]]]]], 200];
FromDigits[Reverse[IntegerDigits[#]]]&/@(Select[Prime[Range[PrimePi[1000]]], MemberQ[psp, #+2]&]) (* Harvey P. Dale, Feb 08 2011 *)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Jani Melik, May 05 2006
STATUS
approved