%I #17 Sep 08 2020 14:21:25
%S 1,7,11,13,17,23,29,31,41,43,49,59,71,79,91,1019,1033,1073,1087,1091,
%T 1093,1127,1139,1163,1169,1187,1193,1219,1223,1237,1243,1259,1301,
%U 1307,1337,1339,1349,1373,1403,1433,1483,1489,1493,1501,1547,1549,1567,1577,1579,1601,1631,1633,1657,1661,1673,1679,11683,11789,11903,11911
%N a(n+1) is the smallest integer > a(n) such that the concatenation of a(n), [a(n+1)-a(n)] and a(n+1) is a prime number.
%e The second term is 7 because 167 is prime [concatenation of 1, the difference (7-1) and 7]. The third term is 11 because 7411 is prime [concatenation of 7, the difference (11-7) and 11]. The next term is 13 because 11213 is prime [concatenation of 11, the difference (13-11) and 13]. And so on. The next term is always the smallest available.
%p S3:= proc(n) option remember; local a, d;
%p if n=1 then 1
%p else a:= S3(n-1);
%p for d while not isprime(parse(cat(a,d,a+d)))
%p do od; a+d
%p fi
%p end:
%p seq(S3(n), n=1..60);
%t nxt[a_]:=Module[{k=a+2},While[CompositeQ[FromDigits[Join[ IntegerDigits[ a],IntegerDigits[k-a],IntegerDigits[k]]]],k+=2];k]; NestList[nxt,1,60] (* _Harvey P. Dale_, Sep 08 2020 *)
%K nonn,base
%O 1,2
%A _Alois P. Heinz_ and _Eric Angelini_, Nov 25 2010