

A323460


Choix de Bruxelles, version 2: irregular table read by rows in which row n lists all the legal numbers that can be reached by halving or doubling some substring of the decimal expansion of n (including the empty string).


13



1, 2, 1, 2, 4, 3, 6, 2, 4, 8, 5, 10, 3, 6, 12, 7, 14, 4, 8, 16, 9, 18, 5, 10, 20, 11, 12, 21, 22, 6, 11, 12, 14, 22, 24, 13, 16, 23, 26, 7, 12, 14, 18, 24, 28, 15, 25, 30, 110, 8, 13, 16, 26, 32, 112, 17, 27, 34, 114, 9, 14, 18, 28, 36, 116, 19, 29, 38
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The differs from the first version (in A323286) in that now n can be reached from n (by using the empty string).
This slight modification of the definition makes the analysis simpler.
The number of numbers that can be reached from n in one step is A323287(n)+1.
The minimal number of steps to reach n starting at 1 is still given by A323454.


LINKS



EXAMPLE

Rows 1 through 20 are:
1, 2,
1, 2, 4,
3, 6,
2, 4, 8,
5, 10,
3, 6, 12,
7, 14,
4, 8, 16,
9, 18,
5, 10, 20,
11, 12, 21, 22,
6, 11, 12, 14, 22, 24,
13, 16, 23, 26,
7, 12, 14, 18, 24, 28,
15, 25, 30, 110,
8, 13, 16, 26, 32, 112,
17, 27, 34, 114,
9, 14, 18, 28, 36, 116,
19, 29, 38, 118,
10, 20, 40


PROG

(Python)
def cdb2(n):
s, out = str(n), {n}
for l in range(1, len(s)+1):
for i in range(len(s)+1l):
if s[i] == '0': continue
t = int(s[i:i+l])
out.add(int(s[:i] + str(2*t) + s[i+l:]))
if t&1 == 0: out.add(int(s[:i] + str(t//2) + s[i+l:]))
return sorted(out)


CROSSREFS



KEYWORD

nonn,base,tabf


AUTHOR



STATUS

approved



