OFFSET
0,4
COMMENTS
Sites containing 0, 1 or 2 grains are stable.
After stabilization, there are:
- 2*a(n) - n sites with one grain,
- n - a(n) sites with two grains.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Representation of the configuration for n = 100000 (blue pixels correspond to sites with one grain, red pixels to sites with two grains)
FORMULA
a(3*n) + 1 = a(3*n + 1) = a(3*n + 2).
EXAMPLE
For n = 10 :
- the model evolves (for example) as follows:
1 1
3 . 2 . 2 1
10 -> 1 3 -> 1 . 3 -> 1 . . 1
3 . 2 . 2 1
1 1
- there are 8 nonempty sites in the stabilized configuration,
- so a(10) = 8.
PROG
(PARI) a(n) = { my (s=[n], v=0); for (k=-1, oo, if (vecmax(s)==0, return (v), v += sum(k=1, #s, s[k]%3>0); s \= 3; s = concat([ s , [0], [0]]) + concat([[0], s , [0]]) + concat([[0], [0], s ]); while (#s>2 && s[1]==0, s = s[2..#s-1]))) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 09 2022
STATUS
approved