%I #15 Jan 24 2020 16:31:14
%S 1,10,11,91,12,19,79,78,8,80,18,13,23,2,20,22,102,14,17,57,58,28,24,
%T 40,4,41,43,30,3,31,32,92,29,69,67,7,70,27,25,50,5,45,49,90,9,89,98,
%U 82,42,104,15,16,46,48,38,35,103,21,81,51,54,94,47,127,61,6,56,59,39,34,114,71,76,60,26,36
%N Lexicographically earliest sequence of distinct positive terms such that a(n), a(n+1) and a(n) + a(n+1) have at least one digit in common.
%H Carole Dubois, <a href="/A331604/b331604.txt">Table of n, a(n) for n = 1..5001</a>
%e 1, 10, 11, 91, 12, 19, 79, 78, 8,
%e a(1) = 1, a(2) = 10 and 11 (sum 1 + 10) have at least the digit 1 in common;
%e a(2) = 10, a(3) = 11 and 21 (sum 10 + 11) have at least the digit 1 in common;
%e a(3) = 11, a(4) = 91 and 102 (sum 11 + 91) have at least the digit 1 in common;
%e a(4) = 91, a(5) = 12 and 103 (sum 91 + 12) have at least the digit 1 in common;
%e a(5) = 12, a(6) = 19 and 31 (sum 12 + 19) have at least the digit 1 in common;
%e a(6) = 19, a(7) = 79 and 98 (sum 19 + 79) have at least the digit 9 in common;
%e a(7) = 79, a(8) = 78 and 157 (sum 79 + 78) have at least the digit 7 in common; etc.
%t Nest[Append[#1, Block[{k = 2}, While[Nand[FreeQ[#1, k], Length@ Intersection[#2, IntegerDigits[k], IntegerDigits[k + #1[[-1]] ]] > 0], k++]; k]] & @@ {#, IntegerDigits[#[[-1]] ]} &, {1}, 75] (* _Michael De Vlieger_, Jan 21 2020 *)
%Y Cf. A331626 (the three terms have no digit in common).
%K base,nonn
%O 1,2
%A _Eric Angelini_ and _Carole Dubois_, Jan 21 2020
|