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.

Showing 1-5 of 5 results.

A376131 Total number of times all nodes fire in a chip-firing game starting with 2n chips at the root on an infinite binary tree with a loop at the root.

Original entry on oeis.org

0, 1, 2, 6, 7, 11, 12, 23, 24, 28, 29, 40, 41, 45, 46, 72, 73, 77, 78, 89, 90, 94, 95, 121, 122, 126, 127, 138, 139, 143, 144, 201, 202, 206, 207, 218, 219, 223, 224, 250, 251, 255, 256, 267, 268, 272, 273, 330, 331, 335, 336, 347, 348, 352, 353, 379, 380, 384, 385, 396, 397, 401, 402, 522, 523
Offset: 1

Views

Author

Keywords

Comments

Adding a loop at the root makes the graph 3-regular: each vertex has degree 3.
The first differences of this sequence give A376132.

Examples

			If there are four chips at the root, then the root fires and the process ends in a stable configuration.
If there are eight chips at the root, the root can fire three times, sending 3 chips to each child. After this, each child can fire once. After that the root has 4 chips and can fire again. The total number of fires is 6.
		

Crossrefs

Programs

  • Maple
    a:= n-> (l-> add(((i-2)*2^(i-1)+1)*(l[i]+1), i=2..nops(l)-1))(Bits[Split](2*n+1)):
    seq(a(n), n=1..65);  # Alois P. Heinz, Sep 12 2024
  • Python
    def f0(n):
        if n <= 2:
            return 0
        else:
            return (n+1) // 2 - 1 + f0((n+1)//2 - 1)
    def a(n):
        numchip = 2*n
        total = 0
        firetime = f0(numchip)
        l = 0
        while firetime > 0:
            total += (2**l) * firetime
            numchip = (numchip+1)//2 - 1
            firetime = f0(numchip)
            l += 1
        return total
    print([a(n) for n in range(1, 66)])

Formula

a(n) = Sum_{k=1..m-1}((k-1)*2^k+1)(b(k)+1), where m = floor(log_2(2*n+1)) and b(m)b(m-1)b(m-2)...b(1)b(0) is a binary representation of 2*n+1 in m+1 bits.

A378724 The number of root fires on a rooted undirected infinite ternary tree with a self-loop at the root, when the chip-firing process starts with 3n chips at the root.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 18, 19, 20, 22, 23, 24, 26, 27, 28, 31, 32, 33, 35, 36, 37, 39, 40, 41, 44, 45, 46, 48, 49, 50, 52, 53, 54, 58, 59, 60, 62, 63, 64, 66, 67, 68, 71, 72, 73, 75, 76, 77, 79, 80, 81, 84, 85, 86, 88, 89, 90, 92, 93, 94, 98, 99, 100, 102, 103, 104, 106, 107
Offset: 1

Views

Author

Tanya Khovanova and the MIT PRIMES STEP senior group, Dec 05 2024

Keywords

Comments

Each vertex of this tree has degree 4. If a vertex has at least 4 chips, the vertex fires and one chip is sent to each neighbor. The root sends 1 chip to its three children and one chip to itself.
The order of the firings doesn't affect the number of firings.
The corresponding sequence for a binary tree is A376116.
The corresponding sequence for a 4-ary tree is A378726.

Examples

			Suppose we start with 12 chips at the root. Then the root will fire 3 times, 12 chips total, three of which return to the root. The stable configuration will have 3 chips at the root and at every child of the root. Thus, a(4) = 3.
Suppose we start with 15 chips at the root. Then the root fires 3 times, 12 chips total, sending away 9 chips. Then the root can fire again, sending away 3 chips and keeping 3 chips. Now, each child of the root has four chips and can fire, returning to the root three more chips. Thus, the root can fire one more time. The stable configuration will have 3 chips at the root and 1 chip at each child and grandchild. Thus, a(5) = 5.
		

Crossrefs

Programs

  • Python
    from math import floor,log
    def to_base(number, base): # Converts number to a base
       digits = []
       while number:
          digits.append(number % base)
          number //= base
       return list(digits)
    def c(m,k,convert): # Calculates the c function
       try:
          num = to_base(convert,k)[m]
       except:
          num = 0
       return num+1
    def F(N,k): # Calculated the F function
       n = floor(log(N*(k-1)+1)/log(k))
       convert = N - int((k**n-1)/(k-1))
       ans = 0
       for j in range(1,n):
          ans += (k**j-1)*c(j,k,convert)
       return int(ans/(k-1))
    seq = []
    for i in range(1,3*100+1,3): # Change this number to get more terms in the sequence
       seq.append(F(i+1,3))
    print(', '.join(map(str,seq)),end='\n\n')

A376132 First differences of A376131.

Original entry on oeis.org

1, 1, 4, 1, 4, 1, 11, 1, 4, 1, 11, 1, 4, 1, 26, 1, 4, 1, 11, 1, 4, 1, 26, 1, 4, 1, 11, 1, 4, 1, 57, 1, 4, 1, 11, 1, 4, 1, 26, 1, 4, 1, 11, 1, 4, 1, 57, 1, 4, 1, 11, 1, 4, 1, 26, 1, 4, 1, 11, 1, 4, 1, 120, 1, 4, 1, 11, 1, 4, 1, 26, 1, 4, 1, 11, 1, 4, 1, 57, 1, 4, 1, 11, 1, 4, 1, 26, 1
Offset: 1

Views

Author

Keywords

Comments

The sequence consists of Eulerian numbers from A000295.
The total number of fires for 2n and 2n-1 chips is the same, this is why the interesting increase is 2.

Crossrefs

Programs

  • Maple
    b:= n-> (l-> add(((i-2)*2^(i-1)+1)*(l[i]+1), i=2..nops(l)-1))(Bits[Split](2*n+1)):
    a:= n-> b(n+1)-b(n):
    seq(a(n), n=1..88);  # Alois P. Heinz, Sep 12 2024

Formula

a(n) = A000295(A376116(n+1) - A376116(n) + 1).

A381462 Limiting sequence of the possible number of inversions in stable configurations of 3^n-1 chips in a chip firing-game directed 3-ary tree resulting from a permutation-based strategy of firing chips.

Original entry on oeis.org

0, 1, 3, 4, 5, 9, 10, 12, 13, 14, 15, 16, 17, 18, 27, 28, 30, 31, 32, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 81, 82, 84, 85, 86, 90, 91, 93, 94, 95, 96, 97, 98, 99, 108, 109, 111, 112, 113, 117, 118, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

Keywords

Comments

Consider a 3-ary, rooted infinite directed tree where each vertex has outdegree 3. Consider the chip firing game on this tree defined in Section 2 of Inagaki, Khovanova, and Luo (2025) with 3^n chips, which are labeled 0, 1, 2, ..., 3^n-1, at the root vertex.
Let A(3, n) be the increasing sequence of all possible numbers of inversions in stable configurations in a chip-firing game on a 3-ary tree starting with 3^n chips resulting from applying a permutation-based strategy corresponding to permutation w of 1,2,..., n. In the strategy, for each i = 1, 2, ..., n, chips with j as the w_i-th most significant digit are sent to the (j+1)-st leftmost child of the fired vertex. For each n, divide each element in A(3, n) by 9^n and put the resulting elements in order from smallest to greatest. These are the first several terms of the sequence.
This sequence is defined at the end of Section 4.3 of "Permutation-based Strategies for Labeled Chip-Firing on k-ary Trees."

Crossrefs

Programs

  • Python
    k = 3
    s = set()
    for i in range(2):
        for j in range(3):
            for l in range(4):
                for m in range(5):
                    for n in range(6):
                        s.add(((k ** 5 - k ** (5-n)) + (k ** 4 - k ** (4-m)) + (k ** 3 - k ** (3-l)) + (k ** 2 - k ** (2-j))+ (k ** 1 - k ** (1-i)))// (k-1))
    l = list(s)
    l.sort()
    print(l)

A381463 Limiting sequence of the possible number of inversions in stable configurations of 4^n-1 chips in a chip firing-game directed 4-ary tree resulting from a permutation-based strategy of firing chips.

Original entry on oeis.org

0, 1, 4, 5, 6, 16, 17, 20, 21, 22, 24, 25, 26, 27, 64, 65, 68, 69, 70, 80, 81, 84, 85, 86, 88, 89, 90, 91, 96, 97, 100, 101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 256, 257, 260, 261, 262, 272, 273, 276, 277, 278, 280, 281, 282, 283, 320, 321, 324, 325, 326, 336, 337, 340
Offset: 1

Views

Author

Keywords

Comments

Consider a 4-ary, rooted infinite directed tree where each vertex has outdegree 4. A chip firing game on this tree is defined as in Section 2 of Inagaki, Khovanova, and Luo (2025). Here we start with 4^n chips labeled 0,1, ..., 4^n-1 at the root.
Let A(4, n) be the increasing sequence of all possible numbers of inversions in stable configurations in a chip-firing game on a directed regular 4-ary tree starting with 4^n chips resulting from applying a permutation-based strategy corresponding to permutation w of 1,2,..., n. In the strategy, for each i = 1, 2, ..., n, chips with j as the w_i-th most significant digit sent to the (j+1)-th leftmost child of the fired vertex. For each n divide each element in A(4, n) by 4^(n-1) * 9 and put the resulting elements in order from smallest to greatest. These are the first several terms of the sequence.
This sequence was defined at the end of Section 4.3 of Inagaki, Khovanova, and Luo (2025).

Crossrefs

Programs

  • Python
    k = 4
    s = set()
    for i in range(2):
        for j in range(3):
            for l in range(4):
                for m in range(5):
                    for n in range(6):
                        s.add(((k** 5 - k ** (5-n)) + (k** 4 - k ** (4-m)) + (k ** 3 - k ** (3-l)) + (k ** 2 - k ** (2-j))+ (k ** 1 - k ** (1-i)))// (k-1))
    l = list(s)
    l.sort()
    print(l)
Showing 1-5 of 5 results.