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 A378962 #16 Jan 24 2025 13:24:01 %S A378962 1,1,1,5,1,1,5,1,1,5,1,1,18,1,1,5,1,1,5,1,1,18,1,1,5,1,1,5,1,1,18,1,1, %T A378962 5,1,1,5,1,1,58,1,1,5,1,1,5,1,1,18,1,1,5,1,1,5,1,1,18,1,1,5,1,1,5,1,1, %U A378962 58,1,1,5,1,1,5,1 %N A378962 First differences of A378726. %C A378962 Sequence A378726(n) is defined to be the total number of fires on a rooted undirected infinite ternary tree with a self-loop at the root, when a chip-firing process starts with 3n chips at the root. The total number of fires for 3n, 3n-1, and 3n-2 chips are the same, so the sequence is defined for one of these three values to remove duplicates. %C A378962 The corresponding sequence for binary trees is A376132; its distinct values are Eulerian numbers A000295. %C A378962 The distinct values of this sequence form sequence A000340. %H A378962 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. 17. %H A378962 Wikipedia, <a href="https://en.wikipedia.org/wiki/Chip-firing_game">Chip-firing game</a>. %F A378962 a(n) = A000340(A378724(n+1)-A378724(n)-1). %e A378962 The total number of fires when starting with 12 chips at the root is 3, and the total number of fires when starting with 15 chips at the root is 8. This means that a(4) = 5. %o A378962 (Python) %o A378962 import math %o A378962 def F(N, k): %o A378962 n = int(math.log(N * (k - 1) + 1, k)) %o A378962 a = [0] * (n + 1) %o A378962 num = N - ((k ** n) - 1)/(k - 1) %o A378962 for i in range(n, -1, -1): %o A378962 if k ** i <= num: %o A378962 a[i] = int(num/(k ** i)) %o A378962 num %= (k ** i) %o A378962 res = 0 %o A378962 for j in range(1, n): %o A378962 x = int((j * (k ** (j + 1)) - (j + 1) * (k ** j) + 1)/((k - 1) ** 2)) %o A378962 res += x * (a[j] + 1) %o A378962 return res %o A378962 s = "" %o A378962 for N in range(1, 200): %o A378962 s += str(int(F(3 * N + 3, 3) - F(3 * N, 3))) %o A378962 s += ", " %o A378962 print(s) %Y A378962 Cf. A000295, A000340, A376132, A378724, A378726. %K A378962 nonn %O A378962 1,4 %A A378962 _Tanya Khovanova_ and the MIT PRIMES STEP senior group, Dec 12 2024