[go: up one dir, main page]

login
A173700
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.
0
1, 7, 11, 13, 17, 23, 29, 31, 41, 43, 49, 59, 71, 79, 91, 1019, 1033, 1073, 1087, 1091, 1093, 1127, 1139, 1163, 1169, 1187, 1193, 1219, 1223, 1237, 1243, 1259, 1301, 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
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
Sequence in context: A260714 A049481 A175412 * A067557 A103485 A191079
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz and Eric Angelini, Nov 25 2010
STATUS
approved