Problem 491: (2015 AIME II, 5)
Two unit squares are selected at random without replacement from an $n \times n$ grid of unit squares. Find the least positive integer $n$ such that the probability that the two selected unit squares are horizontally or vertically adjacent is less than $\frac{1}{2015}$.
- There are $2n(n-1)$ adjacent pairs among $\binom{n^2}2$, so the probability is $\frac{2n(n-1)\cdot2}{n^2(n^2-1)}=\frac4{n(n+1)}$.
- We need $n(n+1)>8060$, so $89\cdot90=8010$, $90\cdot91=8190$.
- $n=90$. The answer is $\boxed{090}$.
Two unit squares are selected at random without replacement from an $n \times n$ grid of unit squares. Find the least positive integer $n$ such that the probability that the two selected unit squares are horizontally or vertically adjacent is less than $\frac{1}{1000}$.