P P and that next triangle

Geometry Level 5

Let P P be a point strictly in the interior of a scalene triangle A B C ABC with integer side lengths, and let f ( P ) = P A + P B + P C f(P) = PA + PB + PC . For each triangle A B C ABC , let h A B C = min P [ f ( P ) ] . h_{ABC} = \min_P\big[f(P)\big].

Now, consider all triangles for which P A , P B , P C PA, PB, PC are all integers. The minimum value of h A B C h_{ABC} for such a triangle can be obtained as shown in the diagram, and scaling it by a factor of 2 gives us the third smallest value of h A B C h_{ABC} . What is the second smallest value of h A B C ? h_{ABC}?

You may use a calculator for the final step of your calculation.


Try this problem first!


The answer is 1029.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Yuriy Kazakov
Apr 11, 2020

Use stupid and not optimal search with Python. Answer 1029 \boxed{1029} .

For optimal solution we can generate primitive the triples ( a , b , c ) = ( 2 m n + n 2 , m 2 n 2 , m 2 + m n + n 2 ) (a,b,c)=(2mn+n^2, m^2-n^2, m^2+mn+n^2) . The case m n m o d 3 m \equiv n \mod 3 is nonprimitive and has already been covered by a smaller (possibly primitive) case. And then we generate the set S S of the triples ( k a , k b , k c ) (ka,kb,kc) with integer k k and find solutions in set S S .

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from math import sqrt
n=5000
s=0
list=[]
k=0
for p in range(1,n-2):
  for q in range(1,min(p,n-p-1)):
    a=sqrt(p*p+p*q+q*q)
    ra=round(a)
    if ra==a:
      for r in range(1,min(q,n-p-q-1)):
        b=sqrt(q*q+q*r+r*r)
        rb=round(b)
        c=sqrt(p*p+p*r+r*r)
        rc=round(c)
        if (rb==b and rc==c):
          print(ra,rb,rc,p,q,r,p+q+r)
          s=s+p+q+r
          k=k+1
          list.append(p+q+r)
print(sorted(list)) 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Python 3.8.1 (default, Feb  2 2020, 08:37:37)

511 399 455 325 264 195 784
665 511 616 440 325 264 1029
1022 798 910 650 528 390 1568
1330 1022 1232 880 650 528 2058
1533 1197 1365 975 792 585 2352
2044 1596 1820 1300 1056 780 3136
1995 1533 1848 1320 975 792 3087
2045 1051 1744 1520 805 384 2709
2555 1995 2275 1625 1320 975 3920
2660 2044 2464 1760 1300 1056 4116
3066 2394 2730 1950 1584 1170 4704
3441 2089 2405 2145 1824 455 4424
[784, 1029, 1568, 2058, 2352, 2709, 3087, 3136, 3920, 4116, 4424, 4704]

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...