OFFSET
1,4
COMMENTS
Sites containing 0 or 1 grain are stable. S(n) contains n elements.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Representation of the configuration for n = 100000
Wikipedia, Sandpile models on directed graphs
EXAMPLE
For n = 15:
- S(15) corresponds to the following configuration:
4| X X X
3|X X X
2|X X X
1|X X
0|X X X X
+---------
0 1 2 3 4
- x+y is maximized for (x,y) = (4,3) and (3,4),
- so a(15) = 3+4 = 7.
PROG
(PARI) a(n) = { my (s=[n]); for (k=-1, oo, if (vecmax(s)==0, return (k), s \= 2; s = concat(0, s) + concat(s, 0); if (#s>2 && s[1]==0, s = s[2..#s-1]))) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 08 2022
STATUS
approved