login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A341755
Maximum number of consecutive integers starting at n such that any pair (k, k+1) among these shares at least one digit with its sum k + (k+1) = 2k + 1.
4
2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 3, 2, 0, 0, 2, 0, 0, 0, 3, 2, 0, 0, 4, 3, 2, 0, 0, 0, 4, 3, 2, 0, 0, 0, 0, 3, 2, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 6, 5, 4, 3, 2, 0, 0, 0, 0, 2, 0, 5, 4, 3, 2, 0, 0, 0, 0, 0, 0, 4, 3, 2, 0, 4, 3, 2, 0, 0, 5, 4, 3, 2, 0, 0, 0, 0, 3
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
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
Cf. A341756, A341757 for records and corresponding indices.
Cf. A011557 (powers of 10).
Sequence in context: A114099 A028613 A318381 * A245515 A366125 A327170
KEYWORD
nonn,base,look
AUTHOR
Eric Angelini and M. F. Hasler, Mar 01 2021
STATUS
approved