If half of the earth is blown away by the impact of a comet, what happens to the orbit of the moon?

$$

**Details and Assumptions:**

- The mass of the earth $M$ is simply halved by the impact, without the fragments interacting with the moon of mass $m.$
- Before the impact, the moon's orbit is a perfect circle with radius $r_0.$
- $M \gg m,$ so the moon can hardly affect the motion of the earth.
- Both the energy $E = \frac{1}{2} m v^2 + V(r)$ and the angular momentum $L = m r^2 \dot \phi$ of the moon are preserved, where $r$ is an arbitrary distance between the earth and moon after the impact.
- The gravitational potential energy of the earth and moon system reads $V(r) = - G \frac{M m}{r},$ where $G$ is the gravitational constant.

To turn a three-story pyramid of coins $($with $1 + 2 + 3 = 6$ coins$)$ upside down, we only need to move 2 coins: moving the bottom left and bottom right coins next to the top coin.

Now, what if there are $1 + 2 + 3 +\cdots+100=5050$ coins instead? What is the minimum number of coins we have to move in order to turn this huge, 100-story pyramid upside down?

**Bonus:** Generalize this for a pyramid of $1+2+3+\cdots+n$ coins.

Forest fires are a fact of life on a planet covered in trees. Some are minor occurrences, burning over a few acres before being snuffed out without event, while others take hold of hundreds of square miles, rage for months and destroy tremendous swaths of forest and property.

Knowing which course a wildfire will take is difficult and involves a number of factors that are hard to model, but there are fundamental questions we might expect to be insensitive to the details such as

- How long will a typical fire burn?
- What fraction of a typical forest will be destroyed?
- Are there any structural features we can exploit to reduce the severity of forest fires?

Here, we're going to build a simple model that we can interrogate in a controlled way.

- First of all, we're going to model the forest as an $L\times L$ lattice, at each point of which a tree can exist or not.
- Next, we're going to assume that trees are placed at lattice points with probability $\rho,$ so that the expected number of trees in the forest is $\langle \textrm{Trees}\rangle = \rho L^2.$
- Finally, any given tree burns for one timestep, and if a tree at point $\left(i, j\right)$ is on fire at time $t,$ all nearest-neighbor trees will be on fire at time $t+1.$

We start the fire by randomly lighting one tree at time zero.

As we increase $\rho,$ the density of trees in the forest increases, as does the likelihood that trees form clusters. Therefore, we might expect that the extent and duration of the average forest fire varies as some function of $\rho.$

When $L=25,$ find $\rho_\textrm{max},$ the tree density at which the expected duration of the forest fire is maximal.

$$

**Note:** The code environment below has a runtime limit of $\SI{10}{\second},$ so be judicious in how you measure the forest. There are three functions in the imported module available for your use: `add_lists()`

which takes two lists of length two and returns their vector sum, `dedupe_list()`

which takes a list of lists and returns its unique elements, and `print_forest()`

which takes a forest lattice and returns a pretty print representation of the state of the forest.

$\Large \lim_{x\to\infty} { \large \dfrac {\displaystyle \sum _{ l\le x }^{ }{ l \left\lfloor \frac { x }{ l } \right\rfloor } }{ { x }^{ 2 } } }$

Find the closed form of the above limit to 3 decimal places.

$$

**Notation:** $\lfloor \cdot \rfloor$ denotes the floor function.

**Bonus:** Can you find a general formula for $\displaystyle \lim _{ x\to \infty}{ \frac {\sum _{ l\le x }^{ }{ {l}^{n} \left\lfloor \frac { x }{ l } \right\rfloor } }{ { x }^{ n+1 } } }$ for $n\ge 1?$