Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Oct 13 2020 19:23:04
%S 7,17,37,71,73,167,181,191,353,373,389,761,787,797,929,983,1753,1879,
%T 3571,7057,7177,7507,7717,7879,9349,9439,9781,9787,15053,15227,15307,
%U 15451,15551,15667,15679,15791,15919,16061,16073,16453,16547,16561,16747,16883,16979,17471,17909,17971,18427
%N Primes p such that reverse(p), reverse(2*p) and reverse(2*reverse(p)) are all primes, where reverse = A004086.
%H Robert Israel, <a href="/A338030/b338030.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3) = 37 is a term because 37, reverse(37)=73, reverse(2*37)=47 and reverse(2*73)=641 are prime.
%p rev:= proc(n) local L,k;
%p L:= convert(n,base,10);
%p add(L[-k]*10^(k-1),k=1..nops(L))
%p end proc:
%p filter:= proc(n) local r;
%p if not isprime(n) then return false fi;
%p r:= rev(n);
%p isprime(r) and isprime(rev(2*n)) and isprime(rev(2*r))
%p end proc:
%p select(filter, [seq(i,i=3..20000,2)]);
%t With[{rev = IntegerReverse}, Select[Range[20000], AllTrue[{#, rev[#], rev[2*#], rev[2*rev[#]]}, PrimeQ] &]] (* _Amiram Eldar_, Oct 10 2020 *)
%o (PARI) rev(n) = fromdigits(Vecrev(digits(n))); \\ A004086
%o isok(p) = if (isprime(p), my(r=rev(p)); isprime(r) && isprime(rev(2*p)) && isprime(rev(2*r))); \\ _Michel Marcus_, Oct 10 2020
%Y Cf. A004086, A007500.
%K nonn,base
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Oct 09 2020