Prove that the number of isosceles triangles with integer sides, no side exceeding n, is $ \frac{1}{4}(3n^2+1)$ or $\frac{1}{4}(3n^2)$ according to whether n is odd or even.
My Working:
Let the sides be $x,y,x$. We know that the sum of 2 sides of a triangle is always greater than the third side. $$\therefore x>y/2$$
Next, it is given that no side can be greater than $n$. $$x\leq n$$
- Case 1: $x
- Case 2: $y\leq x\leq n$ ...
Problem:
Firstly, I can't figure out a solution for case $2$. Moreover, I am not sure about whether what I have done for case $1$ is correct. It would be great if someone could help me find a solution for this question.