login
A352226
Consider a 2D sandpile model where each site with 2 or more grains, say at location (x, y), topples and transfers one grain of sand to the sites at locations (x+1, y) and (x, y+1). Let S(n) be the configuration after stabilization of a configuration with n grains at the origin. a(n) = Max_{ (x,y) in S(n) } (x+y).
2
0, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 21, 21, 21, 21, 23, 23, 23, 23, 23, 23, 23, 23
OFFSET
1,4
COMMENTS
Sites containing 0 or 1 grain are stable. S(n) contains n elements.
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