OFFSET
0,1
COMMENTS
Both members of the pair (k, k+1) must be in the considered set of consecutive integers, therefore a(n) = 0 when there is none, and a(n) >= 2 when there is at least one such pair. (So we consider the "length of a chain" to be the number of vertices, not edges.)
At powers of 10 (A011557) start "trivial" chains of increasingly large length.
LINKS
Jinyuan Wang, Table of n, a(n) for n = 0..10000
Eric Angelini, Pair sums with a shared digit, math-fun discussion list, Mar 01 2021
EXAMPLE
a(0) = 2 because 0 + 1 = 1 shares a digit with (0,1).
a(1) = 0 because 1 + 2 = 3 shares no digit with (0,1).
a(9) = 5 because 9 + 10 = 19 shares '1' with (9, 10); 10 + 11 = 21 shares '1' with (10, 11); ..., 12 + 13 = 25 shares '2' with (12, 13), but 13 + 14 = 27 does not share any digit with (13, 14).
PROG
(PARI) {A341755(n, o=n) = while(#setintersect(Set(concat(digits(n), digits(n+1))), Set(digits(n+n+1))), n+=1); (n>o)+n-o }
CROSSREFS
KEYWORD
AUTHOR
Eric Angelini and M. F. Hasler, Mar 01 2021
STATUS
approved