Snake on a Plane
In a video game called Snake, a player moves a snake through a square region in the plane, trying to eat the white pellets that appear.
If we imagine the playing field as a 32-by-32 grid of pixels, then the snake starts as a 4-by-1 rectangle of pixels, and grows in length as it eats the pellets:
- After the first pellet, it grows in length by one pixel.
- After the second pellet, it further grows in length by two pixels.
- After the third pellet, it further grows in length by three pixels.
- and so on, with the $n$-th pellet increasing its length by $n$ pixels.
Let $L(n)$ denote the length of the snake after eating $n$ pellets. For example, $L(3)=10$.
- How long is the snake after eating 4 pellets? After 5 pellets? After 6 pellets?
- Find a recursive description of the function $L(n)$.
- Find a non-recursive expression for $L(100)$, and evaluate that expression to compute $L(100)$.
- What is the largest number of pellets a snake could eat before he could no longer fit in the playing field? That is, how long is a perfect game of snake?