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).
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
Offset: 1
Examples
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
Links
- Eric Angelini, Lars Blomberg, Charlie Neder, Remy Sigrist, and N. J. A. Sloane, "Choix de Bruxelles": A New Operation on Positive Integers, arXiv:1902.01444 [math.NT], Feb 2019; Fib. Quart. 57:3 (2019), 195-200.
- Eric Angelini, Lars Blomberg, Charlie Neder, Remy Sigrist, and N. J. A. Sloane,, "Choix de Bruxelles": A New Operation on Positive Integers, Local copy.
- Brady Haran and N. J. A. Sloane, The Brussels Choice, Numberphile video (2020)
Programs
-
Python
def cdb2(n): s, out = str(n), {n} for l in range(1, len(s)+1): for i in range(len(s)+1-l): 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) print([c for n in range(1, 21) for c in cdb2(n)]) # Michael S. Branicky, Jul 24 2022
Comments