No. of isosceles triangles possible of integer sides with sides $\leq n$ Prove that the no. of isosceles triangles with integer sides, no sides exceeding $n$ is $\frac{1}{4}(3n^2+1)$ or $\frac{3}{4}(n^2)$ according as n is odd or even, n is any integer.
How to do it? I found that under these conditions no. of triangles possible may be
${n\choose 2}$

Fix the length of the two equal sides, say $k$. In how many ways can you choose the length of the base $b(k)$? Obviously $b(k) \ge 1$ and, for the triangle inequality, $b(k) < 2k$. But, since no side can exceed $n$, $b(k) \le n$. Putting these things together, we conclude that:


*

*when $2k - 1 \le n$, that is, when $\displaystyle k \le \left\lfloor\frac{n+ 1}{2}\right\rfloor$, $b(k)$ can range from $1$ to $2k - 1$ inclusive;

*when $2k - 1 > n$, which means $k > \left\lfloor\frac{n + 1}{2}\right\rfloor$, $b(k)$ can range from $1$ to $n$ inclusive.


Hence the total number of isosceles triangles is $$\sum_{k = 1}^n b(k) = \sum_{k = 1}^{\left\lfloor\frac{n + 1}{2}\right\rfloor} (2k - 1) + \sum_{k = \left\lfloor\frac{n + 1}{2}\right\rfloor + 1}^n n = \left\lfloor\frac{n + 1}{2}\right\rfloor^2 + n\left(n - \left\lfloor\frac{n + 1}{2}\right\rfloor\right)$$
Now when $n$ is odd $\displaystyle \left\lfloor\frac{n + 1}{2}\right\rfloor = \frac{n + 1}{2}$, so the expression above reduces to $$\left(\frac{n + 1}{2}\right)^2 + n\left(n - \frac{n + 1}{2}\right) = \frac{n^2 + 2n + 1 + 4n^2 - 2n^2 - 2n}{4} = \boxed{\frac{3n^2 + 1}{4}}$$ while, when $n$ is even, $\displaystyle \left\lfloor\frac{n + 1}{2}\right\rfloor = \frac{n}{2}$ and the formula is $$\left(\frac{n}{2}\right)^2 + n\left(n - \frac{n}{2}\right) = \frac{n^2 + 4n^2 - 2n^2}{4} = \boxed{\frac{3n^2}{4}}$$
