cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118494 Palindromic primes that are not Chen primes.

This page as a plain text file.
%I A118494 #6 Mar 29 2024 04:22:27
%S A118494 151,313,373,383,727,757,929,10501,11311,12421,13831,14341,15451,
%T A118494 17971,18181,18481,19391,19891,30103,30203,30403,30703,30803,31513,
%U A118494 32323,32423,33533,34543,34843,35053,35153,35353,36563,37273,37573,38083
%N A118494 Palindromic primes that are not Chen primes.
%p A118494 # 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);
%t A118494 Select[ Prime[ Range[5000]], PalindromeQ [#]&&!PrimeQ[ # + 2] &&!PrimeOmega[ #+2]==2 &] (* _James C. McMahon_, Mar 29 2024 *)
%Y A118494 Cf. A002385, A109574, A109611.
%K A118494 nonn,base,less
%O A118494 1,1
%A A118494 _Jani Melik_, May 05 2006