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: # Check if number is palindrome ts_numpal:=proc(n) local ad; ad:=convert(n, base, 10): if (ListTools[Reverse](ad)=ad) then return 'true' else return 'false' fi end: ts_pal_nonchen:=proc(n) local i, ans; ans:=[ ]: for i from 1 to n do if (ischenprime(i) = 'false' and ts_numpal(i) = 'true') then ans:=[op(ans), i]: fi od: return ans end: ts_pal_nonchen(100000);
MATHEMATICA
Select[ Prime[ Range[5000]], PalindromeQ [#]&&!PrimeQ[ # + 2] &&!PrimeOmega[ #+2]==2 &] (* James C. McMahon, Mar 29 2024 *)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Jani Melik, May 05 2006
STATUS
approved