OFFSET
1,2
COMMENTS
All terms are distinct and composed by distinct digits. This is the lexicographically earliest sequence with this property. The sequence is finite but its last term is not known by the author. Note that the sequence would stop much earlier (with a(6) = 31) without an extra rule: a(n) has equal or more digits than the n-th digit of the sequence. Extra rule by Giorgos Kalogeropoulos.
LINKS
Eric Angelini, Shared digits, personal blog.
EXAMPLE
a(1) = 1 and a(2) = 10 share exactly 1 digit;
a(2) = 10 and a(3) = 12 share exactly 1 digit;
a(3) = 12 and a(4) = 3 share 0 digit;
a(4) = 3 and a(5) = 13 share exactly 1 digit;
a(5) = 13 and a(6) = 103 share exactly 2 digits, etc.
We see that the successive numbers of shared digits are the successive digits of the sequence itself (the successive shared digits 1, 1, 0, 1, 2 are the successive digits of the integers that start the sequence: 1, 10, 12).
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(c=1; While[!DuplicateFreeQ[in=(i=IntegerDigits)@c]|| MemberQ[ar=Array[a, n-1], c]||Length@Intersection[i@a[n-1], in]!=Flatten[i/@ar][[n-1]]||IntegerLength@c<Flatten[i/@ar][[n]], c++]; c); Array[a, 50] (* Giorgos Kalogeropoulos, Aug 25 2023 *)
CROSSREFS
KEYWORD
base,nonn,fini
AUTHOR
Eric Angelini, Aug 25 2023
STATUS
approved