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 A349991 #9 Dec 18 2021 15:01:00 %S A349991 0,1,1,1,1,1,6,7,7,7,7,7,6,7,7,7,7,7,6,7,7,7,7,7,6,7,7,7,7,7,6,7,7,7, %T A349991 7,7,18,19,19,19,19,19,18,19,19,19,19,19,18,19,19,19,19,19,18,19,19, %U A349991 19,19,19,18,19,19,19,19,19,18,19,19,19,19,19,24,25 %N A349991 For any n >= 0, consider a sandpile model on the infinite hexagonal lattice starting with n grains at the origin, the other sites being empty; a(n) gives the number of nonempty sites after stabilization of this sandpile model. %C A349991 A site is unstable when it holds 6 or more grains. %C A349991 As long as there is an unstable site: %C A349991 - choose such an unstable site, %C A349991 - remove 6 grains from this site and add 1 grain to each of its six neighbors. %C A349991 This procedure is guaranteed to result in a stable configuration, which does not depend on the order in which we treat the unstable sites. %H A349991 Rémy Sigrist, <a href="/A349991/a349991.png">Colored representation of the stabilized configuration for n = 1000000</a> (white, green, purple, gold, blue and red pixels correspond to sites with 0, 1, 2, 3, 4 and 5 grains, respectively) %H A349991 Rémy Sigrist, <a href="/A349991/a349991.txt">C++ program for A349991</a> %H A349991 Wikipedia, <a href="https://en.wikipedia.org/wiki/Abelian_sandpile_model#Sandpile_models_on_infinite_grids">Sandpile models on infinite grids</a> %F A349991 a(6*n) + 1 = a(6*n + k) for k = 1..5. %e A349991 For n = 54: %e A349991 - after stabilization, we have the following configuration: %e A349991 2 %e A349991 4 4 %e A349991 2 3 2 %e A349991 3 3 %e A349991 4 4 %e A349991 3 3 %e A349991 2 3 2 %e A349991 4 4 %e A349991 2 %e A349991 - we have 18 nonnempty sites, %e A349991 - so a(54) = 18. %o A349991 (C++) See Links section. %Y A349991 Cf. A349990. %K A349991 nonn %O A349991 0,7 %A A349991 _Rémy Sigrist_, Dec 08 2021