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?

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.
