Let us call an integer sided triangle with sides $a \le b \le c$ barely obtuse if the sides satisfy $a^2 + b^2 = c^2 – 1$.
How many barely obtuse triangles are there with perimeter $\le 75\,000\,000$?
This problem is related to the Pythagorean triplets and can be solved using the number theory. A Pythagorean triplet is a set of three positive integers a, b, and c, such that a^2 + b^2 = c^2. According to the Pythagorean theorem, any right angled triangle with sides a, b and c (a
We can rewrite this equation as (a^2 + b^2 + 1) = c^2, which means that not only is c^2 a perfect square, but (a^2 + b^2 + 1) is also a perfect square. Let’s denote these two perfect squares by x^2 and y^2, so x^2 < y^2 and x^2 + 1 = y^2. That means x and y are consecutive integers. Now a^2 + b^2 = x^2 and a + b + y = c, and we need c to be less than or equal to 75,000,000. So if we rearrange the formula to c = a + b + y where y = x + 1, this lets us restrict the possible values of the consecutive integers x and y. Given that x^2 = a^2 + b^2, we can let a = m^2 - n^2, b = 2mn, and x = m^2 + n^2, where m > n > 0 are integers. Then c = m^2 + n^2 + 1, and the perimeter P = a + b + c = 2m^2 + 2mn + 1. We need to find the number of P ≤ 75,000,000.
The maximum m could be sqrt(75,000,000 / 2) = sqrt(37,500,000) = approximately 6124. So run a loop for all possible m from 2 to 6124 (because m > n > 0), and then a nested loop for n from 1 to m – 1. For each pair (m,n), calculate P and if it’s less than or equal to 75,000,000, increment the counter. After the loop ends, the counter value is the answer.
This problem might seem complicated but if you break it down into smaller steps and use number theory such as Pythagorean triplets, it can be solved systematically.
More Answers:
Alexandrian IntegersSphere Packing
Almost Right-angled Triangles I