Finding the number of such 3 digits numbers Let xyz be a three digit number such that x,y,z form sides of an equilateral triangle. How many such numbers are there?
The answer is 9 using p n c 
9*1*1 = 9
Now, if x,y,z form sides of an isoceles triangle. How many such numbers are there?
My try : 
the numbers we can use are 1,2,3,4,5,6,7,8,9 and not 0.
9*1*9 + 9*9*1 + 1*9*9 - .......
I am not getting how to subtract the repeating numbers. Can someone guide?
 A: Suppose the isosceles triangle had equal sides of length $n $. Let the other side length be  $k $. In a triangle, we know that the sum of two sides $>$ than the third side.
We thus have $2n>k $ and $n+k >n $. The second condition is always true as $k \geq 1$. For the value of  $k $ to satisfy the first condition, the permissible values of $k $ are $k \in [1,2n-1] \in \mathbb N $. For $n \in [1,9] \in \mathbb N $, can you thus find all permissible $k $?
The answer is $\boxed {165} $ if we also include the equilateral triangles as they are isosceles. If we exclude them , there are $\boxed {165-9=156} $ cases. Hope it helps. 
A: Let the equal side length be n and k be the length of the other side
For $n = 1, k = 1 \qquad (1)$
For $n = 2, k = 1,2,3 \qquad (3)$
For $n = 3, k = 1,2,3,4,5 \qquad (5)$
For $n = 4, k = 1,2,3,4,5,6,7 \qquad (7)$
For $n>4,       k = 1,2,3,4,5,6,7,8,9   \quad (5\times 9=45)$
Total $ = 1+3+5+7+45 = 61$
Considering combination, total number of such numbers become $61 × (3!)/(2!) = 61×3 = 183$
Now eliminating the repeated numbers, we get $183 - (2×9) = 165$. Considering the Equilateral triangles are also isoceles triangles.
