cp's OEIS Frontend

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.

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.

Original entry on oeis.org

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, 16, 17, 17, 17, 20, 21, 21, 21, 20, 21, 21, 21, 20, 21, 21, 21, 24, 25, 25, 25, 24, 25, 25, 25, 24, 25, 25, 25, 32, 33, 33, 33, 36, 37, 37, 37, 36, 37, 37, 37, 36
Offset: 0

Views

Author

Rémy Sigrist, Dec 08 2021

Keywords

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.

Examples

			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.
		

Crossrefs

Formula

a(4*n) + 1 = a(4*n+1) = a(4*n+2) = a(4*n+3).