OFFSET
1,1
COMMENTS
The side of the inscribed square having two vertices on the hypotenuse of a right triangle, sides x<y<z is 1. s = xyz/(z^2+xy). So if z and s are known we can solve for x and y. solving 1. for xy, squaring and substituting y^2 = z^2 - x^2 we get a quartic in x, z^2*x^2 - x^4 = z^4*s^2/(z-s)^2 which a quadratic in x^2. Let q=x^2, a=z^2 and b = z^4*s^2/(z-s)^2 then solving q^2 - aq + b = 0 we get q = (a +/- sqrt(a^2-4b))/2 and x = sqrt(q) = sqrt((a +/- sqrt(a^2-4b))/2) This implies z^4 >= 4*z^4*s^2/(z-s)^2. So it follows for a solution to exist, z >= 3s. For s=60 and z = 185 we have a = 185^2, b = 185^4*60^2/125^2=269879184 then x1 = sqrt((185^2 - sqrt(185^4-4*269879184))/2) = 111 x2 = sqrt((185^2 - sqrt(185^4+4*269879184))/2) = 148 So x= 111 and y = 148. It is interesting to note that 37 almost always divides these numbers. Some exceptions are 1145, 2290, 3272, and 3435.
PROG
(PARI) g(n)= { for(x=1, n, for(y=x, n, z=sqrt(x^2+y^2); s=x*y*z/(z^2+x*y); if(s==floor(s), print1(floor(x)", ") ) ) ) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Nov 17 2006
STATUS
approved