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.

Showing 1-1 of 1 results.

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).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 08 2022

Keywords

Comments

Sites containing 0 or 1 grain are stable. S(n) contains n elements.

Examples

			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.
		

Crossrefs

Programs

  • 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]))) }
Showing 1-1 of 1 results.