OFFSET
1,2
EXAMPLE
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.
MAPLE
S3:= proc(n) option remember; local a, d;
if n=1 then 1
else a:= S3(n-1);
for d while not isprime(parse(cat(a, d, a+d)))
do od; a+d
fi
end:
seq(S3(n), n=1..60);
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz and Eric Angelini, Nov 25 2010
STATUS
approved