The side lengths of a Heronian Triangle
are R-1, R and R+1, where R is an 8-digit positive integer which does not contain any leading zero.
Determine all possible value(s) of R for which this is possible.
The formula for the area of a triangle given its side lengths a, b, and c is Area = sqrt[s(s-a)(s-b)(s-c)], where s = 1/2(a+b+c). Substituting R-1, R, and R+1 for a, b, and c respectively gives Area = R/4 * sqrt[3(R^2 - 4)], which is only rational when R^2 - 4 = 3N^2 for some integer N. Rather than check all 90 million 8-digit Rs for this property, I came across a recursive formula that will generate these Rs:
R(0) = 2, R(1) = 4; R(n) = 4 * R(n-1) - R(n-2) for n > 1
A simple program gave only one 8-digit solution, which is R = 27,246,964. Whether or not this really is the only possible value for R, I'm not for sure.