login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Composite numbers which when read backwards are primes.
5

%I #20 Nov 21 2021 07:36:32

%S 14,16,20,30,32,34,35,38,50,70,74,76,91,92,95,98,104,106,110,112,118,

%T 119,124,125,128,130,133,134,136,140,142,145,146,152,160,164,166,170,

%U 172,175,182,188,194,196,200,300,301,305,310,316,320,322,325,328,332

%N Composite numbers which when read backwards are primes.

%C If m is a term, then 10*m is another term. - _Bernard Schott_, Nov 20 2021

%H Michael S. Branicky, <a href="/A076055/b076055.txt">Table of n, a(n) for n = 1..10000</a>

%t Rev[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Select[Range[332],!PrimeQ[#] && PrimeQ[Rev[#]]&] (* _Jayanta Basu_, May 01 2013 *)

%o (Python)

%o from sympy import isprime

%o def ok(n): return not isprime(n) and isprime(int(str(n)[::-1]))

%o print([k for k in range(333) if ok(k)]) # _Michael S. Branicky_, Nov 20 2021

%Y Cf. A076056.

%Y Intersection of A002808 and A095179.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Oct 04 2002

%E Corrected and extended by _Sascha Kurz_, Jan 20 2003