OFFSET
1,3
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.
LINKS
Wikipedia, Chip-firing game.
EXAMPLE
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.
PROG
(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')
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova and the MIT PRIMES STEP senior group, Dec 05 2024
STATUS
approved