Triangle $ABC$ has positive integer side lengths with $AB=AC$. Let $I$ be the intersection of the bisectors of $\angle B$ and $\angle C$. Suppose $BI=8$. Find the smallest possible perimeter of $\triangle ABC$.
Let $\angle B=2\theta$ and $c=\cos\theta$. The foot of the altitude from $A$ is the midpoint of $BC$, and $I$ lies on it, so $\frac{BC}2=BI\cos\theta$, so $BC=16c=n$ is an integer.
$AB=\frac{BC/2}{\cos2\theta}=\frac{8c}{2c^2-1}=\frac{64n}{n^2-128}$, with $\cos\theta>\cos45^\circ$, i.e.\ $12\le n\le15$.
Only $n=12$ gives an integer ($AB=48$). Perimeter $12+96=108$. The answer is $\boxed{108}$.
Triangle $ABC$ has positive integer side lengths with $AB=AC$. Let $I$ be the intersection of the bisectors of $\angle B$ and $\angle C$. Suppose $BI=7$. Find the smallest possible perimeter of $\triangle ABC$.