This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A356715 #26 Jan 09 2025 13:05:51 %S A356715 1,2,3,6,11,26,68,177,492,1403,4113,12149,36225,108268,324529,973163, %T A356715 2920533,8764041,26303715,78935398,236878491,710783343 %N A356715 Total number of distinct numbers that can be obtained by starting with 1 and applying the "Choix de Bruxelles", version 2 operation at most n times in ternary (base 3). %H A356715 Eric Angelini, Lars Blomberg, Charlie Neder, Remy Sigrist, and N. J. A. Sloane, <a href="http://arxiv.org/abs/1902.01444">"Choix de Bruxelles": A New Operation on Positive Integers</a>, arXiv:1902.01444 [math.NT], Feb 2019; Fib. Quart. 57:3 (2019), 195-200. %H A356715 Eric Angelini, Lars Blomberg, Charlie Neder, Remy Sigrist, and N. J. A. Sloane,, <a href="/A307635/a307635.pdf">"Choix de Bruxelles": A New Operation on Positive Integers</a>, Local copy. %H A356715 J. Conrad, <a href="https://raw.githubusercontent.com/cxr00/cxr/master/tests/base64/choix_de_bruxelles.py">Python program</a>. %e A356715 For n = 2, a(2) = 3 since the numbers obtained are (in base 3): 1, 2, 11. %e A356715 For n = 4, they expand to a(5) = 11 numbers (in base 3): 1, 2, 11, 12, 21, 22, 101, 111, 112, 121, 211. %o A356715 (Python) # See Conrad link. %o A356715 (Python) %o A356715 from itertools import islice %o A356715 from sympy.ntheory import digits %o A356715 def fd(d, b): return sum(b**i*di for i, di in enumerate(d[::-1])) %o A356715 def cdb2(n, base=3): %o A356715 d, out = digits(n, base)[1:], {n} %o A356715 for l in range(1, len(d)+1): %o A356715 for i in range(len(d)+1-l): %o A356715 if d[i] == 0: continue %o A356715 t = fd(d[i:i+l], base) %o A356715 out.add(fd(d[:i] + digits(2*t, base)[1:] + d[i+l:], base)) %o A356715 if t&1 == 0: %o A356715 out.add(fd(d[:i] + digits(t//2, base)[1:] + d[i+l:], base)) %o A356715 return out %o A356715 def agen(): %o A356715 reach, expand = {1}, [1] %o A356715 while True: %o A356715 yield len(reach) #; print(reach); print([digits(t, 3)[1:] for t in sorted(reach)]) %o A356715 newreach = {r for q in expand for r in cdb2(q) if r not in reach} %o A356715 reach |= newreach %o A356715 expand = list(newreach) %o A356715 print(list(islice(agen(), 10))) # _Michael S. Branicky_, Aug 24 2022 %Y A356715 Cf. A323289 (decimal), A356511 (base 12) %K A356715 nonn,base,more %O A356715 0,2 %A A356715 _J. Conrad_, Aug 24 2022 %E A356715 a(15)-a(19) from _Michael S. Branicky_, Aug 24 2022 %E A356715 a(20)-a(21) from _Michael S. Branicky_, Aug 30 2022