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
Robert Israel, Table of n, a(n) for n = 1..10000
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.
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
(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
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Mar 01 2021
STATUS
approved