The no. of possible $3$ digit number $abc$ if $a,b,c$ are the sides of a isosceles triangle.

258 Views Asked by At

I approached this way:

Having equal sides $1,2,3,4$ then the possible $3$ digit numbers are $111,112,221,222,223,...,448$

Then total number of $3$ digit numbers possible

$2(1+2+3+4)=20$

$20-4=16$

$16\cdot3=48$

Now for equal sides $5,6,7,8,9$

$5\cdot9=45$ ,$45-5=40,40\cdot3=120$

$120+48=168$

But the solution given is $165$.Even after checking a lot I couldn't get where is wrong.

2

There are 2 best solutions below

5
On BEST ANSWER

I can only find $1+3+5+7 = 16$ triangles with equal sides $a$ and $b$ of lengths $1,\,2,\,3,\,4$ which respect the triangle inequality. From those $16$ triangles, I subtract the four equilateral ones, permute the remaining ones and add the equilateral triangles again, which gives $$ (16-4)\cdot 3 + 4 = 40 $$ triangles with equal sides $1,\,2,\,3,\,4.$

There are $45$ triangles with equal sides $a$ and $b$ of lengths $5,\,6,\,7,\,8,\,9$ which respect the triangle inequality. From those $45$ triangles, I subtract the five equilateral ones, permute the remaining ones and add the equilateral triangles again, which gives $$ (45-5)\cdot 3 + 5 = 125 $$ triangles with equal sides $5,\,6,\,7,\,8,\,9.$

1
On

Using sage, we have

sage: R = [1..9]
sage: RRR = cartesian_product([R,R,R])
sage: S = [ (a,b,c) for (a,b,c) in RRR if len({a,b,c}) <= 2 and a < b+c and b < a+c and c < a+b ]
sage: T = [ 100*a + 10*b + c for (a,b,c) in S ]
sage: T.sort()
sage: for k in [0..14]:
....:     for n in [0..10]:
....:         print T[11*k+n],
....:     print
....:     
111 122 133 144 155 166 177 188 199 212 221
222 223 232 233 244 255 266 277 288 299 313
322 323 331 332 333 334 335 343 344 353 355
366 377 388 399 414 424 433 434 441 442 443
444 445 446 447 454 455 464 466 474 477 488
499 515 525 533 535 544 545 551 552 553 554
555 556 557 558 559 565 566 575 577 585 588
595 599 616 626 636 644 646 655 656 661 662
663 664 665 666 667 668 669 676 677 686 688
696 699 717 727 737 744 747 755 757 766 767
771 772 773 774 775 776 777 778 779 787 788
797 799 818 828 838 848 855 858 866 868 877
878 881 882 883 884 885 886 887 888 889 898
899 919 929 939 949 955 959 966 969 977 979
988 989 991 992 993 994 995 996 997 998 999

and there are

sage: len(S)
165

elements in the solution set S.