cp's OEIS Frontend

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.

Previous Showing 11-17 of 17 results.

A323464 Values of n at which A323484 reaches a new record.

Original entry on oeis.org

1, 2, 3, 6, 20, 40, 80, 1975, 3999, 15995, 39999
Offset: 1

Views

Author

N. J. A. Sloane, Jan 23 2019

Keywords

Comments

The corresponding numbers of steps are 0, 1, 11, 12, 13, 14, 15, 16, 17.

Examples

			a(4)=20 refers to the fact that it takes 13 steps to reach 100 from 5 using the Choix de Bruxelles (version 2) operation, and all multiples of 5 less than 100 can be reached from 5 in fewer than 13 steps.
		

Crossrefs

Extensions

a(10) from Michael S. Branicky, Oct 05 2024
a(11) from Michael S. Branicky, Oct 11 2024

A356511 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 duodecimal (base 12).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 19, 45, 107, 275, 778, 2581, 10170, 45237, 222859, 1191214, 6887258, 42894933, 287397837
Offset: 0

Views

Author

J. Conrad, Aug 09 2022

Keywords

Examples

			For n=4, the a(4) = 5 numbers obtained are (in base 12): 1, 2, 4, 8, 14.
For n=5, they expand to a(5) = 9 numbers (in base 12): 1, 2, 4, 8, 12, 14, 18, 24, 28.
		

Crossrefs

Cf. A323289 (decimal).

Programs

  • Python
    # See Conrad link.
    
  • Python
    from itertools import islice
    from sympy.ntheory import digits
    def fd12(d): return sum(12**i*di for i, di in enumerate(d[::-1]))
    def cdb2(n):
        d, out = digits(n, 12)[1:], {n}
        for l in range(1, len(d)+1):
            for i in range(len(d)+1-l):
                if d[i] == 0: continue
                t = fd12(d[i:i+l])
                out.add(fd12(d[:i] + digits(2*t, 12)[1:] + d[i+l:]))
                if t&1 == 0:
                    out.add(fd12(d[:i] + digits(t//2, 12)[1:] + d[i+l:]))
        return out
    def agen():
        reach, expand = {1}, [1]
        while True:
            yield len(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(), 14))) # Michael S. Branicky, Aug 17 2022

Extensions

a(16)-a(18) from Michael S. Branicky, Aug 17 2022

A360703 Starting from 1, successively take the smallest "Choix de Bruxelles" with factor 3 which is not already in the sequence.

Original entry on oeis.org

1, 3, 9, 27, 67, 187, 129, 43, 41, 121, 17, 37, 97, 277, 677, 1877, 1297, 199, 133, 111, 113, 119, 139, 339, 313, 311, 331, 131, 191, 193, 393, 333, 399, 999, 933, 911, 913, 919, 319, 357, 157, 57, 19, 13, 11, 31, 33, 39, 99, 93, 91, 271, 273, 279, 679, 673, 671, 1871, 1291, 197, 137, 117, 151, 51, 53, 59, 159, 153
Offset: 0

Views

Author

Alon Vinkler, Feb 16 2023

Keywords

Comments

At a given term t, the Choix de Bruxelles with factor 3 can choose to multiply any decimal digit substring (not starting 0) of t by 3 or divide by 3 if that substring is divisible by 3.
These choices on substrings give various possible next values and here take the smallest not yet in the sequence.
The sequence can be finite if the only choices we have are already in the sequence, but this has not been found in the first 1125299 terms.

Examples

			Below, square brackets [] represent multiplication by 3(e.g., [4] = 12); curly brackets {} represent division by 3 (e.g., {6} = 2); digits outside the brackets are not affected by the multiplication or division (e.g., 1[3] = 19 and 1{18} = 16).
We begin with 1 and, at each step, we go to the smallest number possible that hasn't yet appeared in the sequence:
 1 --> [1] = 3
 3 --> [3] = 9
 9 --> [9]= 27
 27--> [2]7 = 67
 67--> [6]7= 187
 187 --> 1{87}=129
 129 --> {129} = 43
 ... and so on.
		

Crossrefs

A323462 Smallest number that can be obtained from the "Choix de Bruxelles", version 2 (A323460) operation applied to n.

Original entry on oeis.org

1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 11, 11, 13, 12, 15, 13, 17, 14, 19, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 21, 21, 23, 22, 25, 23, 27, 24, 29, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 31, 31, 33, 32, 35, 33, 37, 34, 39, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 41
Offset: 1

Views

Author

N. J. A. Sloane, Jan 23 2019

Keywords

Comments

Smallest element in row n of irregular triangle in A323460.
Theorem: Let the decimal expansion of n be d_1 d_2 ... d_k. (i) If there is a substring d_r ... d_s which starts with d_r = 1 and ends with an even digit d_s = e, take that string which starts with the leftmost 1 and ends with the rightmost even digit, and halve it. (ii) Otherwise, if there is an even digit e, take the substring from d_1 to the rightmost such e and halve it. (iii) Otherwise, all d_i are odd, and a(n) = n.

Examples

			From 23 we can reach any of 13, 43, 26, 46, and the smallest of these is a(23) = 13.
		

Crossrefs

A323463 Values of n at which A323454 reaches a new record.

Original entry on oeis.org

1, 2, 3, 99, 369, 999, 1999, 9879, 19979
Offset: 1

Views

Author

N. J. A. Sloane, Jan 23 2019

Keywords

Comments

The corresponding numbers of steps are 0, 1, 11, 12, 13, 14, 15, 16.

Examples

			a(4)=99 refers to the fact that it takes 12 steps to reach 99 from 1 using the Choix de Bruxelles (version 2) operation, and all numbers less than 99 (and not ending in 0 or 5) can be reached from 1 in fewer than 12 steps.
		

Crossrefs

Extensions

a(9) from Michael S. Branicky, Oct 01 2024

A334629 Smallest number that can be obtained by starting with 1 and applying "Choix de Bruxelles (version 2)" (see A323460) n times without backtracking or repeating.

Original entry on oeis.org

1, 2, 4, 8, 16, 13, 23, 17, 14, 7, 6, 3, 99, 369, 999, 1999, 9879, 19979
Offset: 0

Views

Author

Philip C. Ritchey, Sep 09 2020

Keywords

Examples

			a(0)-a(4) = 1,2,4,8,16 by applying 0,1,2,3,4 steps: 1->2->4->8->16.
a(5) = 13 by applying 5 steps: 1->2->4->8->16->13 (halve the 6 in 16).
a(11) = 3 by applying 11 steps to reach 3 from 1.
		

Crossrefs

Formula

A323454(a(n)) = n by definition.

Extensions

a(17) from Michael S. Branicky, Oct 01 2024

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).

Original entry on oeis.org

1, 2, 3, 6, 11, 26, 68, 177, 492, 1403, 4113, 12149, 36225, 108268, 324529, 973163, 2920533, 8764041, 26303715, 78935398, 236878491, 710783343
Offset: 0

Views

Author

J. Conrad, Aug 24 2022

Keywords

Examples

			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.
		

Crossrefs

Cf. A323289 (decimal), A356511 (base 12)

Programs

  • Python
    # See Conrad link.
    
  • 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

Extensions

a(15)-a(19) from Michael S. Branicky, Aug 24 2022
a(20)-a(21) from Michael S. Branicky, Aug 30 2022
Previous Showing 11-17 of 17 results.