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 A349990 #11 Dec 18 2021 15:00:49 %S A349990 0,1,1,1,4,5,5,5,4,5,5,5,4,5,5,5,12,13,13,13,12,13,13,13,12,13,13,13, %T A349990 16,17,17,17,20,21,21,21,20,21,21,21,20,21,21,21,24,25,25,25,24,25,25, %U A349990 25,24,25,25,25,32,33,33,33,36,37,37,37,36,37,37,37,36 %N A349990 For any n >= 0, consider a sandpile model on the infinite square 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 A349990 A site is unstable when it holds 4 or more grains. %C A349990 As long as there is an unstable site: %C A349990 - choose such an unstable site, %C A349990 - remove 4 grains from this site and add 1 grain to each of its four neighbors. %C A349990 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 A349990 Rémy Sigrist, <a href="/A349990/a349990.png">Colored representation of the stabilized configuration for n = 1000000</a> (white, green, purple and gold pixels correspond to sites with 0, 1, 2 and 3 grains, respectively) %H A349990 Rémy Sigrist, <a href="/A349990/a349990.txt">C++ program for A349990</a> %H A349990 Wikipedia, <a href="https://en.wikipedia.org/wiki/Abelian_sandpile_model#Sandpile_models_on_infinite_grids">Sandpile models on infinite grids</a> %F A349990 a(4*n) + 1 = a(4*n+1) = a(4*n+2) = a(4*n+3). %e A349990 For n = 25: %e A349990 - after stabilization, we have the following configuration: %e A349990 1 %e A349990 2 3 2 %e A349990 1 3 1 3 1 %e A349990 2 3 2 %e A349990 1 %e A349990 - there are 13 nonempty sites, %e A349990 - so a(25) = 13. %o A349990 (C++) See Links section. %Y A349990 Cf. A307097, A349991. %K A349990 nonn %O A349990 0,5 %A A349990 _Rémy Sigrist_, Dec 08 2021