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”).

A342145
Numbers k such that k + (k+1) = 2*k + 1 shares at least one digit with either k or k+1.
3
0, 9, 10, 11, 12, 15, 19, 20, 23, 24, 25, 29, 30, 31, 36, 37, 39, 40, 48, 49, 50, 51, 52, 57, 59, 60, 61, 62, 69, 70, 71, 73, 74, 75, 78, 79, 80, 81, 86, 87, 89, 90, 91, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110
OFFSET
1,2
COMMENTS
The terms come frequently in runs of consecutive integers; sequence A341755 gives the length of the run + 1.
In particular, all intervals [10^m-1, ..., 10^m+(10^m-1)/9], m >= 1, e.g., {9, 11}, {99, ..., 111}, {999, ..., 1111}, ..., are subsequences.
See A342146 and A342147 for the variants where 2k+1 shares a digit with k, respectively with k+1. Their union equals this sequence.
Almost all numbers are in this sequence: It has asymptotic density 1, since almost all large enough numbers are pandigital.
LINKS
EXAMPLE
0 and 9 are in the sequence because 0 + 1 = 1 and 9 + 10 = 19 share a digit with {0, 1} and with {9, 10}, respectively.
1 and 8 and 13 are not in the sequence because 1 + 2 = 3, 8 + 9 = 17 and 13 + 14 = 27 do not share a digit with the respective right hand side.
See A342146 and A342147 for more examples.
MAPLE
filter:= proc(n) convert(convert(2*n+1, base, 10), set) intersect(convert(convert(n, base, 10), set) union convert(convert(n+1, base, 10), set)) <> {} end proc:
select(filter, [$1..200]); # Robert Israel, Oct 24 2021
PROG
(PARI) select( is_A342135 = A341755, [0..199])
(Python)
def ok(n): return set(str(2*n+1)) & set(str(n)+str(n+1)) != set()
print([k for k in range(111) if ok(k)]) # Michael S. Branicky, Oct 24 2021
CROSSREFS
Cf. A341755, A341756, A341757; A342146 and A342147 (variants).
Cf. A002275 (repunits: (10^n-1)/9), A005408 (odd numbers: 2n+1).
Sequence in context: A258469 A360538 A173147 * A293761 A253881 A097480
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Mar 01 2021
STATUS
approved