The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 0
1, 2, 3, 6, 11, 26, 68, 177, 492, 1403, 4113, 12149, 36225, 108268, 324529, 973163, 2920533, 8764041, 26303715, 78935398, 236878491, 710783343 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
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.
J. Conrad, Python program.
EXAMPLE
For n = 2, a(2) = 3 since the numbers obtained are (in base 3): 1, 2, 11.
For n = 4, they expand to a(5) = 11 numbers (in base 3): 1, 2, 11, 12, 21, 22, 101, 111, 112, 121, 211.
PROG
(Python) See links
(Python)
from itertools import islice
from sympy.ntheory import digits
def fd(d, b): return sum(b**i*di for i, di in enumerate(d[::-1]))
def cdb2(n, base=3):
d, out = digits(n, base)[1:], {n}
for l in range(1, len(d)+1):
for i in range(len(d)+1-l):
if d[i] == 0: continue
t = fd(d[i:i+l], base)
out.add(fd(d[:i] + digits(2*t, base)[1:] + d[i+l:], base))
if t&1 == 0:
out.add(fd(d[:i] + digits(t//2, base)[1:] + d[i+l:], base))
return out
def agen():
reach, expand = {1}, [1]
while True:
yield len(reach) #; print(reach); print([digits(t, 3)[1:] for t in sorted(reach)])
newreach = {r for q in expand for r in cdb2(q) if r not in reach}
reach |= newreach
expand = list(newreach)
print(list(islice(agen(), 10))) # Michael S. Branicky, Aug 24 2022
CROSSREFS
Cf. A323289 (decimal), A356511 (base 12)
Sequence in context: A094927 A024423 A115114 * A324768 A086209 A022490
KEYWORD
nonn,base,more
AUTHOR
J. Conrad, Aug 24 2022
EXTENSIONS
a(15)-a(19) from Michael S. Branicky, Aug 24 2022
a(20)-a(21) from Michael S. Branicky, Aug 30 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 06:57 EDT 2024. Contains 372538 sequences. (Running on oeis4.)