Consider a sequence T n , n ≥ 1 of all distinct integral triangles.
Distinct triangles means that no two triangles are congruent.
Integral triangle means all the sides of triangle are positive integers.
Let us denote the general term of this sequence as
T n = ( a , b , c ) where a ≤ b ≤ c and a , b , c , n ∈ N (set of natural numbers)
Here a will be called as smallest side, b will be always called as second smallest side no matter b = a for some triangle and c will be called as largest side.
First term of this sequence is the smallest integral triangle possible which is an equilateral triangle of side length 1 .
So, T 1 = ( 1 , 1 , 1 )
RULES FOR SEQUENCING ALL THE INTEGRAL TRIANGLES
Let T m = ( a m , b m , c m ) and T n = ( a n , b n , c n ) for some m , n ∈ N
( A ) Triangle with greater perimeter will be placed in the sequence after the triangle with lesser perimeter.
a m + b m + c m < a n + b n + c n ⇒ m < n
( B ) If perimeter of two triangles are same then triangles will be placed in the increasing order of their smallest side.
If a m + b m + c m = a n + b n + c n then a m < a n ⇒ m < n
( C ) If perimeter and smallest side are same then triangles will be placed in increasing order of second smallest side.
If a m + b m + c m = a n + b n + c n and a m = a n then b m < b n ⇒ m < n
( D ) If all the corresponding sides are same then the triangles are congruent.
If a m + b m + c m = a n + b n + c n , a m = a n and b m = b n ⇒ c m = c n ⇒ m = n
For clarity of the rules mentioned above the first few terms of this sequence is shown below :
( 1 , 1 , 1 ) , ( 1 , 2 , 2 ) , ( 2 , 2 , 2 ) , ( 1 , 3 , 3 ) , ( 2 , 2 , 3 ) , ( 2 , 3 , 3 ) , ( 1 , 4 , 4 ) , ( 2 , 3 , 4 ) , ( 3 , 3 , 3 )
Find T 2 0 2 0 . If R and r are the circum-radius and in-radius respectively of triangle T 2 0 2 0 . Enter R r .
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.
Great solution. Thanks for sharing a solution.
Substitute a b c = k 0 + 2 k 1 + k 2 + 1 = k 0 + k 1 + k 2 + 1 = k 1 + k 2 + 1
Where k 0 , k 1 , k 2 are non-negative integers. This naturally causes a ≥ b ≥ c and a < b + c as per triangle inequality and makes it easy to apply Diophantine methods.
From the method shown here , we can calculate the number of solutions where the perimeter, a + b + c = 2 k 0 + 4 k 1 + 3 k 2 + 3 < n , and find that a + b + c < 6 5 has 1 9 9 1 solutions while a + b + c < 6 6 has 2 0 8 7 solutions. Hence T 2 0 2 0 must have a perimeter of 6 5 . From here it can be done by hand by starting from c = 1 and going up that c = 1 0 and hence ( a , b , c ) = ( 2 9 , 2 6 , 1 0 ) .
Here's the function that generates the number of triangles if the perimeter < n , which I'll denote P(n):
\[
P(n)=\begin{cases}
\frac{1}{8}(12k^3 - 6k^2 - (-1)^k + 1) & \text{ if } n-3 \equiv 0 \text{ mod } 6 \\
\frac{1}{2}(3k^3 - k) & \text{ if } n-3 \equiv 1 \text{ mod } 6 \\
\frac{1}{8}(12k^3 + 6k^2 + (-1)^k - 1) & \text{ if } n-3 \equiv 2 \text{ mod } 6 \\
\frac{1}{2}(3k^3 + 3k^2) & \text{ if } n-3 \equiv 3 \text{ mod } 6 \\
\frac{1}{8}(12k^3 + 18k^2 + 8k - (-1)^k + 1) & \text{ if } n-3 \equiv 4\text{ mod } 6 \\
\frac{1}{2}(3(k+1)^3 - 3(k+1)^2) & \text{ if } n-3 \equiv 5 \text{ mod } 6
\end{cases}
\text{ Where } k = \left\lfloor \frac{n-3}{6} \right\rfloor + 1 \]
Another solution will be to use a computer to bruteforce. Here's my 1 line python code:
1 |
|
First we have to generalise the number of integral triangles with a specific perimeter.
Let the perimeter of triangle be p . The sides of triangle be a , b and c . Then
a + b > c ⇒ a + b + c > 2 c ⇒ p > 2 c ⇒ c < 2 p
Similarly, we can get
a < 2 p and b < 2 p
Since a , b and c have to be integers. So permissible range of a , b and c are
1 ≤ a ≤ ⌈ 2 p ⌉ − 1 1 ≤ b ≤ ⌈ 2 p ⌉ − 1 1 ≤ b ≤ ⌈ 2 p ⌉ − 1
Now let us count number of integer triplets ( a , b , c ) ignoring the restriction a ≤ b ≤ c such that
a + b + c = p
subject to 1 ≤ a , b , c ≤ ⌈ 2 p ⌉ − 1
Let a = x + 1 , b = y + 1 and c = z + 1 . Then
x + y + z = p − 3
subject to 0 ≤ x , y , z ≤ ⌈ 2 p ⌉ − 2
Let x + l = ⌈ 2 p ⌉ − 2 , y + m = ⌈ 2 p ⌉ − 2 and z + n = ⌈ 2 p ⌉ − 2 with x , y , z , l , m , n ≥ 0 . Then
l + m + n = 3 ⌈ 2 p ⌉ − p − 3
subject to 0 ≤ l , m , n [ Right hand side constriant is not needed because it is already fulfilled by the above equation ]
This is a familiar system of integer variables.
So, number of ordered triplets ( l , m , n ) satisfying above conditions is 2 ( 3 ⌈ 2 p ⌉ − p − 1 ) ( 3 ⌈ 2 p ⌉ − p − 2 ) . For each triplet ( l , m , n ) there exist only one triplet ( x , y , z ) and for each triplet ( x , y , z ) there exist only one triplet ( a , b , c ) . So this is same as number of ordered triplets ( a , b , c ) .
Let S 0 p denote total number of ordered triplets ( a , b , c ) satisfying
a + b + c = p
subject to 1 ≤ a , b , c ≤ ⌈ 2 p ⌉ − 1
Then S 0 p = 2 ( 3 ⌈ 2 p ⌉ − p − 1 ) ( 3 ⌈ 2 p ⌉ − p − 2 )
In this S 0 p order of the triplet ( a , b , c ) is taken into account. For ex- when p = 3 0 , both the triplet ( 5 , 1 2 , 1 3 ) and ( 1 2 , 5 , 1 3 ) is counted. But actually both corresponds to the same triangle. Triplet ( 5 , 1 2 , 1 3 ) is counted 3 ! = 6 times, triplet ( 8 , 1 1 , 1 1 ) is counted 2 ! 3 ! = 3 times and triplet ( 1 0 , 1 0 , 1 0 ) is counted 1 time. So it is not that for determining the number of distinct triangles we can divide S 0 p by a particular number. We have to determine number of triangles of each category counted in S 0 p and then divide them by 6 , 3 , 1 to get the total number of distinct triangles.
Let S 1 p denote the number of triangles counted in S 0 p in which two sides are equal and third side is different.
S 2 p denote the number of triangles counted in S 0 p in which all three sides are equal.
S 3 p denote the number of triangles counted in S 0 p in which all three sides are different.
S p denote the number of distinct triangles counted in S 0 p .
Then definitely, S 0 p = S 1 p + S 2 p + S 3 p
and S p = 3 S 1 p + 1 S 2 p + 6 S 3 p
Calculation of S 1 p
There are three cases : 1 . l = m = n 2 . l = m = n 3 . l = n = m . We will solve for first one.
2 l + n = 3 ⌈ 2 p ⌉ − p − 3
subject to 0 ≤ l , n
We see that for every l there exist an n satisfying above condition. But converse is not always true because for existence of l , n should be such that n and RHS is of same parity. So for counting we will use the condition on l .
2 l + n = 3 ⌈ 2 p ⌉ − p − 3
⇒ 0 ≤ 2 l ≤ 3 ⌈ 2 p ⌉ − p − 3
⇒ 0 ≤ l ≤ 2 3 ⌈ 2 p ⌉ − p − 3
Since l is to be integer, 0 ≤ l ≤ ⌊ 2 3 ⌈ 2 p ⌉ − p − 3 ⌋
In this range of l there might be possibility that n = l which we have to exclude from S 1 p but this will happen only 1 time and also only when 3 ∣ p . For simplifying the ceiling and floor operator we have to take 4 cases on p . And in each case, two subcases whether 3 ∣ p or 3 ∣ p .
If 3 ∣ p , then S 2 p = 1 otherwise S 2 p = 0
Case 1 : 4 ∣ p − 1 & 3 ∣ p
S 0 p = 8 p 2 − 1
S 1 p = 4 3 ( p − 1 )
S 2 p = 0
S 3 p = S 0 p − S 1 p − S 2 p = 8 p 2 − 1 − 4 3 ( p − 1 ) − 0 = 8 ( p − 1 ) ( p − 5 )
S p = 3 S 1 p + 1 S 2 p + 6 S 3 p
⇒ S p = 4 p − 1 + 4 8 ( p − 1 ) ( p − 5 )
⇒ S p = 4 8 ( p − 1 ) ( p + 7 )
Writing direct result for other cases.
Case 2 : 4 ∣ p − 1 & 3 ∣ p
S 0 p = 8 p 2 − 1 , S 1 p = 4 3 ( p − 5 ) , S 2 p = 1 , S 3 p = 8 p 2 − 6 p + 2 1 , S p = 4 8 ( p + 3 ) 2
Case 3 : 4 ∣ p − 2 & 3 ∣ p
S 0 p = 8 ( p − 2 ) ( p − 4 ) , S 1 p = 4 3 ( p − 2 ) , S 2 p = 0 , S 3 p = 8 ( p − 2 ) ( p − 1 0 ) , S p = 4 8 p 2 − 4
Case 4 : 4 ∣ p − 2 & 3 ∣ p
S 0 p = 8 ( p − 2 ) ( p − 4 ) , S 1 p = 4 3 ( p − 6 ) , S 2 p = 1 , S 3 p = 8 ( p − 6 ) 2 , S p = 4 8 p 2 + 1 2
Case 5 : 4 ∣ p − 3 & 3 ∣ p
S 0 p = 8 p 2 − 1 , S 1 p = 4 3 ( p + 1 ) , S 2 p = 0 , S 3 p = 8 ( p + 1 ) ( p − 7 ) , S p = 4 8 ( p + 1 ) ( p + 5 )
Case 6 : 4 ∣ p − 3 & 3 ∣ p
S 0 p = 8 p 2 − 1 , S 1 p = 4 3 ( p − 3 ) , S 2 p = 1 , S 3 p = 8 ( p − 3 ) 2 , S p = 4 8 ( p + 3 ) 2 + 1 2
Case 7 : 4 ∣ p & 3 ∣ p
S 0 p = 8 ( p − 2 ) ( p − 4 ) , S 1 p = 4 3 ( p − 4 ) , S 2 p = 0 , S 3 p = 8 ( p − 4 ) ( p − 8 ) , S p = 4 8 p 2 − 1 6
Case 8 : 4 ∣ p & 3 ∣ p
S 0 p = 8 ( p − 2 ) ( p − 4 ) , S 1 p = 4 3 ( p − 8 ) , S 2 p = 1 , S 3 p = 8 p 2 − 1 2 p + 4 8 , S p = 4 8 p 2
Take a note that Case 2 S p = Case 1 S p + 3 1
and similarly, Case 4 S p = Case 3 S p + 3 1
Case 6 S p = Case 5 S p + 3 1
Case 8 S p = Case 7 S p + 3 1
For ex - if we have to find S 1 2 it comes in Case 8 . So we use the formula given in Case 7 putting p = 1 2 and then add 3 1 to get S 1 2 . In general to find any S p we will use the formula considering p not a multiple of 3 and if p is a multiple of 3 we will add 3 1 to it.
Now we have to find the triangle T 2 0 2 0 . First let us determine the perimeter of triangle T 2 0 2 0 . Let perimeter of T 2 0 2 0 be t . Then we have to find the position where first triangle of perimeter t is located. So we have to find maximum value of t such that
S 3 + S 4 + S 5 + ⋯ + S t − 1 + S t ≤ 2 0 2 0
Since there is no general term of S p that we can substitute in above equation to get the value of t , we have to make a group of 4 starting from perimeter 3 . Since 7 ≡ 3 mod 4 , 8 ≡ 4 mod 4 , 9 ≡ 5 mod 4 , 1 0 ≡ 6 mod 4 . Formula for p = 3 and p = 7 is almost same just the term 3 1 differ and similarly for others. So we can make a group 3 , 4 , 5 , 6 and 7 , 8 , 9 , 1 0 and so on 4 n − 1 , 4 n , 4 n + 1 , 4 n + 2 , n ≥ 1
Take a example of first 4 groups : ( 3 , 4 , 5 , 6 ) , ( 7 , 8 , 9 , 1 0 ) , ( 1 1 , 1 2 , 1 3 , 1 4 ) and ( 1 5 , 1 6 , 1 7 , 1 8 ) .
We can see that in first 3 groups, there are 4 numbers which are multiple of 3 . So if we want to add from S 3 to S 1 4 we have to add 3 1 , ; 4 times. if we want to add from S 3 to S 1 8 we have to add 3 1 , 6 times. In general, if we want to add first N groups, if N is a multiple of 3 , we have to add 3 1 , 4 ⌊ 3 N ⌋ times. If N mod 3 = 1 we have to add 3 1 , 4 ⌊ 3 N ⌋ + 2 times. If N mod 3 = 2 we have to add 3 1 , 4 ⌊ 3 N ⌋ + 3 times.
Let Sum ( N ) = n = 1 ∑ N ( S 4 n − 1 + S 4 n + S 4 n + 1 + S 4 n + 2 ) + 3 1 ⋅ 4 ⌊ 3 N ⌋ + 3 ( N mod 3 ) + 1
The expression in blue is to be added only when N mod 3 = 0 . Above expression Sum ( N ) is the sum of number of distinct triangles with perimeter 3 to perimeter 4 N + 2 .
We have to find maximum N such that Sum ( N ) ≤ 2 0 2 0 . After we have found such N then it will be sure that t is one of 4 N + 2 , 4 N + 3 , 4 N + 4 , 4 N + 5 . Then it will be easy to determine T 2 0 2 0 .
Simplifying Sum ( N )
S 4 n − 1 = 4 8 4 n ( 4 n + 4 ) = 3 n ( n + 1 )
S 4 n = 4 8 1 6 n 2 − 1 6 = 3 n 2 − 1
S 4 n + 1 = 4 8 4 n ( 4 n + 8 ) = 3 n ( n + 2 )
S 4 n + 2 = 4 8 ( 4 n + 2 ) 2 − 4 = 3 n ( n + 1 )
Sum ( N ) = n = 1 ∑ N ( 3 n ( n + 1 ) + 3 n 2 − 1 + 3 n ( n + 2 ) + 3 n ( n + 1 ) ) + 3 1 ⋅ 4 ⌊ 3 N ⌋ + 3 ( N mod 3 ) + 1
⇒ Sum ( N ) = 3 1 n = 1 ∑ N ( 4 n 2 + 4 n − 1 ) + 3 1 ⋅ 4 ⌊ 3 N ⌋ + 3 ( N mod 3 ) + 1
⇒ Sum ( N ) = 3 4 n = 1 ∑ N n 2 + 3 4 n = 1 ∑ N n − 3 1 n = 1 ∑ N 1 + 3 1 ⋅ 4 ⌊ 3 N ⌋ + 3 ( N mod 3 ) + 1
⇒ Sum ( N ) = 9 2 N ( N + 1 ) ( 2 N + 1 ) + 3 2 N ( N + 1 ) − 3 N + 3 1 ⋅ 4 ⌊ 3 N ⌋ + 3 ( N mod 3 ) + 1
⇒ Sum ( N ) = 9 4 N 3 + 3 4 N 2 + 9 5 N + 3 4 ⌊ 3 N ⌋ + 3 ( N mod 3 ) + 1
Now solving for Sum ( N ) ≤ 2 0 2 0
Case A : N = 3 k , k ≥ 1
9 4 N 3 + 3 4 N 2 + 9 5 N + 9 4 N ≤ 2 0 2 0
⇒ N ( 4 N 2 + 1 2 N + 9 ) ≤ 9 ⋅ 2 0 2 0 = 1 8 1 8 0
⇒ N ( 2 N + 3 ) 2 ≤ 1 8 1 8 0
Ignoring 3 from 2 N + 3 to get upper bound on N .
⇒ 4 N 3 < 1 8 1 8 0
⇒ N ≤ ( 4 1 8 1 8 0 ) 3 1 = 1 6 . 5 6 4 5
Since N is a multiple of 3 , on checking for N = 1 5 , we get that N = 1 5 satisfy the equation.
Case B : N = 3 k + 1 , k ≥ 1
9 4 N 3 + 3 4 N 2 + 9 5 N + 3 4 ( 3 N − 1 ) + 3 2 ≤ 2 0 2 0
⇒ N ( 2 N + 3 ) 2 ≤ 1 8 1 7 8
Finding upper bound of N by ignoring 3 .
⇒ N < ( 4 1 8 1 7 8 ) 3 1 = 1 6 . 5 6 3 9
Checking for N = 1 6 , we get that it does not satisfy the equation.
Checking for N = 1 3 , we get that it satisfy the equation.
Case C : N = 3 k + 2 , k ≥ 1
9 4 N 3 + 3 4 N 2 + 9 5 N + 3 4 ( 3 N − 2 ) + 3 3 ≤ 2 0 2 0
⇒ N ( 2 N + 3 ) 2 ≤ 1 8 1 7 9
Finding upper bound of N by ignoring 3 .
⇒ N ≤ ( 4 1 8 1 7 9 ) 3 1 = 1 6 . 5 6 4 2
Checking for N = 1 4 , we get that it satisfy the equation.
Maximum value of N from all the cases is N = 1 5 with Sum ( N ) = 1 8 1 5 = number of distinct triangles from perimeter 3 to perimeter 4 ⋅ 1 5 + 2 = 6 2 .
So, last triangle with perimeter 6 2 is T 1 8 1 5 .
Now, S 6 3 = 3 1 6 ⋅ 1 7 + 3 1 = 9 1
1 8 1 5 + 9 1 = 1 9 0 6 < 2 0 2 0
S 6 4 = 3 1 6 2 − 1 = 8 5
1 9 0 6 + 8 5 = 1 9 9 1 < 2 0 2 0
S 6 5 = 3 1 6 ⋅ 1 8 = 9 6
1 9 9 1 + 9 6 = 2 0 8 7 > 2 0 2 0
So, t = 6 5
First triangle of perimeter 6 5 is T 1 9 9 2 and last triangle triangle of perimeter 6 5 is T 2 0 8 7
2 0 2 0 − 1 9 9 2 + 1 = 2 9
We have to find the 2 9 t h triangle of perimeter 6 5 .
Maximum value of any side is ⌈ 2 6 5 ⌉ − 1 = 3 2
Starting with a = 1 , there is only 1 triangle that is ( 1 , 3 2 , 3 2 ) .
When a = 2 , only 1 triangle ( 2 , 3 1 , 3 2 ) .
When a = 3 , 2 triangles - ( 3 , 3 0 , 3 2 ) , ( 3 , 3 1 , 3 1 ) .
When a = 4 , 2 triangles - ( 4 , 2 9 , 3 2 ) , ( 4 , 3 0 , 3 1 ) .
and it follows a pattern that when a = 2 b − 1 or a = 2 b number of triangles for each is b . But this pattern follows till a = 1 6 . After that when a = 1 7 , ( 1 7 , 1 6 , 3 2 ) is also counted in b = 9 triangles. But this triangle is already counted when a = 1 6 .
1 + 1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 = 3 0
Last 5 corresponds to a = 1 0 and second last 5 corresponds to a = 9 . So last triangle with a = 9 is 2 5 t h triangle with perimeter 6 5 . So 2 9 t h triangle of perimeter 6 5 is 4 t h triangle with a = 1 0 . Writing all 5 triangles with a = 1 0 in sequential order.
( 1 0 , 2 3 , 3 2 ) , ( 1 0 , 2 4 , 3 1 ) , ( 1 0 , 2 5 , 3 0 ) , ( 1 0 , 2 6 , 2 9 ) , ( 1 0 , 2 7 , 2 8 )
So, 2 9 t h triangle of perimeter 6 5 is ( 1 0 , 2 6 , 2 9 ) .
Hence, T 2 0 2 0 = ( 1 0 , 2 6 , 2 9 ) . R and r are circum-radius and in-radius of T 2 0 2 0 . We know that
Area of triangle = 4 R a b c where a , b and c are sides of triangle and R is its circum-radius.
Also, area of triangle = s r where s is semiperimeter of triangle and r is its in-radius.
So, from both the equation we get,
4 R a b c = s r
⇒ R r = 4 s a b c
⇒ R r = 2 ⋅ 6 5 1 0 ⋅ 2 6 ⋅ 2 9
⇒ R r = 5 8
P.S. - This is a very long solution so there might be some sort of typing mistake or any mathematical mistake or any other type of error. So please let me know so I can correct it. I have skipped many steps just to reduce the size of solution otherwise it would have been be too long.
great problem. thank you.
Log in to reply
Thank you too for solving my problem. You can try my other problems as well.
Log in to reply
Fine problem. Thanks. And here the another problem https://brilliant.org/problems/im-bored-3/
Log in to reply
@Yuriy Kazakov – I have seen that problem and tried also. Now I am giving it a second try. I don't know how to calculate P ( n ) for such large n . I think programming also doesn't store such large value.
Log in to reply
@Shikhar Srivastava – Python is very good helper for such large numbers.
Log in to reply
@Yuriy Kazakov – Oh! I know C++. Well I am trying to do by just applying mathematics and small part of programming.
Log in to reply
@Shikhar Srivastava – Example Python - find digits sum and length of big number 7^100000.
https://repl.it/ - site for C++, Python and another Language online.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
1 2 3 |
|
Log in to reply
@Yuriy Kazakov – Thank you. I am also trying to do it in my own way.
Problem Loading...
Note Loading...
Set Loading...
Consider a triangle with sides x , y and z where x ≤ y ≤ z . By the triangle inequality, we know that ∣ x + y ∣ > ∣ z ∣ . Given these 2 inequalities, it is apparent that x , y ≤ z < x + y . Thus we can find the upper and lower limit of perimeter n of triangles with shortest two sides x and y .
The lower limit of n allowed is when z = y such that n = x + 2 y and the upper limit is when z = x + y − 1 such that n = 2 x + 2 y − 1 , thus giving
x + 2 y ≤ n ≤ 2 x + 2 y − 1 − x + 2 1 ( n + 1 ) ≤ y ≤ − 2 1 x + 2 1 n
By considering the ordered pair ( x , y ) as lattice points in a Cartesian coordinate system and the inequalities imposed on a given n , the question boils down to counting the number of lattice points in the given triangle on the plane defined by the inequalities.
The approach to counting the number of lattice points for a triangle with perimeter p will be to count how many points the upper limit y = − 2 1 x + 2 1 n passes through as n ranges from 3 to p and subtracting the number of points the lower limit − x + 2 1 ( n + 1 ) = y passes through as n ranges from 3 to p − 1 .
Notice that at n = 3 , it passes through 1 lattice point at ( 1 , 1 ) , which corresponds to the ( 1 , 1 , 1 ) triangle. Following the line x = 1 , the line crosses a lattice point when n is odd and halfway when n is even. This corresponds to the constant term incrementing by 2 1 for every increase in n by 1 . The line at x = 2 behaves similarly but only starts when n = 6 , and so does x = 3 when n = 9 . This is because the point of intersection between the upper limit and y = x is defined by x = y = 3 n . Thus the lattice points intersected by the line follows this pattern:
n 3 4 5 6 7 8 9 1 0 1 1 1 2 ⋮ No. of lattice points 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 ⋮
where 1 denotes a point where the line intersects a lattice point and 0 if not, and the digits represent the value of x (first digit represents x = 1 , second is x = 2 , and so on). By summing vertically, the total number of lattice points passed as n ranges from 3 to p is
⌈ 2 p − 2 ⌉ + ⌈ 2 p − 5 ⌉ + … + ⌈ 2 p − 2 − 3 ⌊ 3 p − 2 ⌋ ⌉ = k = 0 ∑ ⌊ 3 p − 2 ⌋ ⌈ 2 p − 2 − 3 k ⌉
Using the exact same argument, the number of lattice points passed by the lower limit from n to p − 1 is
⌈ 2 ( p − 1 ) − 2 ⌉ + ⌈ 2 ( p − 1 ) − 6 ⌉ + … + ⌈ 2 ( p − 1 ) − 2 − 4 ⌊ 4 ( p − 1 ) − 2 ⌋ ⌉ = k = 0 ∑ ⌊ 4 p − 3 ⌋ ⌈ 2 p − 3 − 4 k ⌉
Thus the total number of lattice points and thus triangles themselves, N ( p ) , corresponding to a perimeter p is given by
N ( p ) = k = 0 ∑ ⌊ 3 p − 2 ⌋ ⌈ 2 p − 2 − 3 k ⌉ − k = 0 ∑ ⌊ 4 p − 3 ⌋ ⌈ 2 p − 3 − 4 k ⌉
Using this equation, we can see that the perimeter of T 2 0 2 0 must have a length of 65, since p = 3 ∑ 6 4 N ( p ) = 1 9 9 1 < 2 0 2 0 < p = 3 ∑ 6 5 N ( p ) = 2 0 8 7 .
Now that we have narrowed down the triangle corresponding to T 2 0 2 0 to having a perimeter of 6 5 , we need to consider the order that the lattice points comes in. It is given that the triangles are ordered by smallest side first, followed by second smallest side. Hence the points are ordered first by increasing x followed by increasing y . Here we are looking for the position of the 29th point (since 2 0 2 0 − 1 9 9 1 = 2 9 )
Consider the easily proven fact that the upper and lower limits both pass through the point ( 1 , Y ) , where Y is an integer. This means that the line x = 1 contains only 1 lattice point. The lower limit of y = − x + 2 1 ( n + 1 ) decreases by 1 for every unit increase in x , so that the line always intersects a lattice point for integer x . The upper limit of y = 2 1 ( n − x ) decreases by only 2 1 for every unit increment in x , meaning that the vertical distance between the limits increases by 0 . 5 for every unit increase in x .
Since the lower limit always intersects a lattice point for integer x ,the number of lattice points in the vertical strip of x = X is simply ⌈ 2 X ⌉ ∀ X ≤ 4 n + 1 , which translates to a pattern of 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , … . The sum of the first 9 values gives 2 5 while adding the next value gives 30. Hence the point is at ( 1 0 , − 1 0 + 2 1 ( 6 5 + 1 ) + ( 4 − 1 ) ) = ( 1 0 , 2 6 ) . This, for a triangle with perimeter 6 5 , corresponds to the triplet ( 1 0 , 2 6 , 2 9 ) .