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 A378726 #19 Apr 06 2025 08:46:26 %S A378726 0,1,2,3,8,9,10,15,16,17,22,23,24,42,43,44,49,50,51,56,57,58,76,77,78, %T A378726 83,84,85,90,91,92,110,111,112,117,118,119,124,125,126,184,185,186, %U A378726 191,192,193,198,199,200,218,219,220,225,226,227,232,233,234,252,253,254,259,260,261,266,267,268,326 %N A378726 The total number of 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. %C A378726 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. %C A378726 The order of the firings doesn't affect the number of firings. %C A378726 The corresponding sequence for a binary tree is in A376131. %C A378726 The corresponding sequence for a ternary tree is in A378724. %H A378726 Yifan Xie, <a href="/A378726/b378726.txt">Table of n, a(n) for n = 1..10000</a> %H A378726 Dillan Agrawal, Selena Ge, Jate Greene, Tanya Khovanova, Dohun Kim, Rajarshi Mandal, Tanish Parida, Anirudh Pulugurtha, Gordon Redwine, Soham Samanta, and Albert Xu, <a href="https://arxiv.org/abs/2501.06675">Chip-Firing on Infinite k-ary Trees</a>, arXiv:2501.06675 [math.CO], 2025. See p. 13. %H A378726 Wikipedia, <a href="https://en.wikipedia.org/wiki/Chip-firing_game">Chip-firing game</a>. %e A378726 Suppose we start with 12 chips at the root. Then the root will fire 3 times, 12 chips in total, 3 of which return to the root. The stable configuration will have 3 chips at the root and every child of the root. Thus, a(4) = 3. %e A378726 Suppose we start with 15 chips at the root. Then the root will fire 3 times, sending away 9 chips. After that, the root can fire again, sending away 3 chips and keeping 3 chips. Now, each child of the root has four chips, and they can also fire. Firing them returns 3 chips to the root. 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. The root fires 5 times, and each child fires three times. Thus, a(5) = 8. %o A378726 (Python) %o A378726 from math import floor,log %o A378726 def to_base(number, base): # Converts number to a base %o A378726 digits = [] %o A378726 while number: %o A378726 digits.append(number % base) %o A378726 number //= base %o A378726 return list(digits) %o A378726 def c(m,k,convert): # Calculates the c function %o A378726 try: %o A378726 num = to_base(convert,k)[m] %o A378726 except: %o A378726 num = 0 %o A378726 return num+1 %o A378726 def F(N,k): # Calculated the F function %o A378726 n = floor(log(N*(k-1)+1)/log(k)) %o A378726 convert = N - int((k**n-1)/(k-1)) %o A378726 ans = 0 %o A378726 for m in range(1,n): %o A378726 ans += (m*(k**(m+1))-(m+1)*(k**m)+1)*c(m,k,convert) %o A378726 return int(ans/((k-1)**2)) %o A378726 seq = [] %o A378726 for i in range(1,3*100+1,3): # Change this number to get more terms in the sequence %o A378726 seq.append(F(i+1,3)) %o A378726 print(', '.join(map(str,seq)),end='\n\n') %Y A378726 Cf. A376131, A378724, A378725, A378727, A378728. %K A378726 nonn %O A378726 1,3 %A A378726 _Tanya Khovanova_ and the MIT PRIMES STEP senior group, Dec 05 2024