OFFSET
1,2
EXAMPLE
a(1), read backwards, is 1, which is present in a(1) + a(2) = 1+ 9 = 10;
a(2), read backwards, is 9, which is present in a(2) + a(3) = 9+10 = 19;
a(3), read backwards, is 01, which is present in a(3) + a(4) = 10+91 = 101;
a(4), read backwards, is 19, which is present in a(4) + a(5) = 91+28 = 119; etc.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(k=1; While[MemberQ[Array[a, n-1], k]|| !StringContainsQ[ToString[a[n-1]+k], StringReverse@ToString@a[n-1]], k++]; k); Array[a, 51]
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
an, aset, mink = 1, set(), 2
while True:
yield an; aset.add(an); t = str(an)[::-1]; mink = max(int(t)-an, 2)
an = next(k for k in count(mink) if k not in aset and t in str(an+k))
print(list(islice(agen(), 51))) # Michael S. Branicky, Oct 15 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Giorgos Kalogeropoulos, Oct 15 2023
STATUS
approved