%I #13 Dec 31 2022 02:31:42
%S 3,7,17,53,97,193,431,1997,5381,30097,128663,278209,385831,481141,
%T 1217509,2401991,2485831,2625911,3070037,35912561,39202231,44531771,
%U 45393841,47084041,50037011,53639681,54693481,54949481,55225217,56094281,56885351,58632851,59858651,61030121,62932621,64195073,64683491
%N First of three consecutive primes p, q, r, such that the reverse of p+q+r is divisible by at least one of p, q and r.
%C Suggested in an email from _J. M. Bergot_.
%C It appears that in most cases, p+q+r = 3*q and is a palindrome. This occurs for 109 of the 122 terms < 5*10^9.
%e a(3) = 17 is a term because 17, 19, 23 are consecutive primes with 17 + 19 + 23 = 59 and the reverse of 59 is 95 which is divisible by 19.
%p rev:= proc(n) local L,i;
%p L:= convert(n,base,10);
%p add(L[-i]*10^(i-1),i=1..nops(L))
%p end proc:
%p q:= 2: r:= 3:
%p R:= NULL: count:= 0:
%p while count < 50 do
%p p:= q; q:= r; r:= nextprime(r);
%p x:= rev(p+q+r);
%p if x mod p = 0 or x mod q = 0 or x mod r = 0 then count:= count+1; R:= R,p;
%p fi;
%p od:
%p R;
%t q[tri_] := AnyTrue[tri, Divisible[IntegerReverse[Total[tri]], #] &]; Select[Partition[Prime[Range[250000]], 3, 1], q][[;; , 1]] (* _Amiram Eldar_, Dec 28 2022 *)
%o (Python)
%o from sympy import nextprime
%o from itertools import count, islice
%o def agen(): # generator of terms
%o p, q, r = 2, 3, 5
%o while True:
%o t = int(str(p+q+r)[::-1])
%o if any(t%s == 0 for s in (p, q, r)): yield p
%o p, q, r = q, r, nextprime(r)
%o print(list(islice(agen(), 19))) # _Michael S. Branicky_, Dec 27 2022
%Y Cf. A004086, A034961.
%K nonn,base
%O 1,1
%A _Robert Israel_, Dec 27 2022