OFFSET
0,5
COMMENTS
A site is unstable when it holds 4 or more grains.
As long as there is an unstable site:
- choose such an unstable site,
- remove 4 grains from this site and add 1 grain to each of its four neighbors.
This procedure is guaranteed to result in a stable configuration, which does not depend on the order in which we treat the unstable sites.
LINKS
Rémy Sigrist, Colored representation of the stabilized configuration for n = 1000000 (white, green, purple and gold pixels correspond to sites with 0, 1, 2 and 3 grains, respectively)
Rémy Sigrist, C++ program for A349990
Wikipedia, Sandpile models on infinite grids
FORMULA
a(4*n) + 1 = a(4*n+1) = a(4*n+2) = a(4*n+3).
EXAMPLE
For n = 25:
- after stabilization, we have the following configuration:
1
2 3 2
1 3 1 3 1
2 3 2
1
- there are 13 nonempty sites,
- so a(25) = 13.
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 08 2021
STATUS
approved