A Cubic Puzzle 

A puzzle site on the internet asked for a solution, in integers, of the equation 



The question didn’t specify nonzero integers, so we obviously have the trivial solution x = y = z = 0. Even if we stipulate nonzero integers, it’s easy to give an infinite family of integer solutions of any equation of the form 



simply by setting x = Bw and y = −Aw, in which case the equation reduces to z = s^{3} where s = x + y + z. Hence we can substitute for z in the above equation, take the cube root of both sides, and rearrange the terms to give 



Now if we set s = (A−B)k for some arbitrary integer k, we can substitute for s and solve for w to give 



Consequently for any integer k the cubic (2) is satisfied by the integers x,y,z given by 



Of course, these are not the only integer solutions of (2). More generally, any equation of the form (2) can be rewritten as 



where (again) s = x + y + z. For any chosen value of s (provided it doesn’t violate any divisibility requirements) this equation has infinitely many integer solutions given by the Euclidean algorithm. For example, if we choose s = 1000, the original cubic (1) is 



This has the infinite family of solutions 



More generally, if x_{0}, y_{0}, z_{0} is any solution of (2), then so is x_{0} + αj, y_{0} + βj, z_{0} + γj provided that 



Therefore, setting α = −(B−1), β = (A−1), γ = −(A−B), we have the infinite family of solutions 



Since we can find such an infinite family of solution for any chosen value of s (satisfying the divisibility requirements), we have a doublyinfinite set of integer solutions of (1). 

The preceding solutions don’t require the x and y terms to cancel out, but they typically lead to solutions in which either x or y is negative. By a suitable choice of s we can find solutions with x and y both positive, but then we typically find that the value of z is negative. For example, with s = 495884 the Euclidean algorithm gives the solutions 



Another simple approach to generating solutions of (1) is to note that if the integers x_{0}, y_{0}, z_{0} are a solution then 



for any integer j. Consequently, if X, Y, Z are any integers such that (1) is satisfied modulo 16, then the value of j is given by 



and from this we can compute the solution 



All these methods give solutions that satisfy the original stated puzzle, which asked for integer solutions, but it isn’t obvious that any of these methods gives solutions in strictly positive integers. 

It is certainly possible to have positive integer solutions to some equations of the form (2). For example, the equation 



has the solution x=1, y=2, x=1. Also, the equation 



has the solution x=13, y=7, z=8. More in the spirit of the original puzzle, we also have 



We also have two solutions for 



As an aside, we note that there is also a solution of the “54321” equation with z = 0, so we have a solution of the twovariable relation 



In general a twovariable equation of the form 



is more tractable, because the left side can be written as A(x+y) − (A−B)y, which implies that x+y must be a divisor of A−B (assuming x and y are coprime). Therefore, letting s denote x+y and putting this equal to each divisor of A−B, we can compute rational values of x and y by solving the two equations Ax + By = s^{3} and x + y = s. This gives 



In order to make x and y positive, the value of s^{2} must be between A and B, so we need only check the divisors of A−B that are between √A and √B. This enables us to determine very efficiently all the positive integer solutions (if any) of (5) for any given values and A and B. For example, by this method we can prove that there are no positive integer solutions of 



On the other hand, for the equation 



we have A – B = (2^{2})(6736)(32069), and if we set s = (2^{2})(6736) we get the positive integer solution x = 18795, y = 8153. 

Returning to the original threevariable equation, we can adapt the same approach, assuming s and z are given, and computing the values 



We know there are no positive integer solutions x,y with z=0, but we can check with z = 1, 2, 3, 4, 5, and 6. (Using equation (4), it is sufficient to check just these six values of z for solutions modulo 16, then compute j, and then shift the values accordingly.) It is not necessary in this case for s to be a divisor of A – B, but we can still check the values of s in a suitable range. By this method we find that equation (1) has the positive integer solution x = 27150, y = 1500, z = 1350. A second solution in positive integers is x = 7350, y = 6000, z = 6650. Interestingly, the quantity x – y + z equals (2∙3∙5)^{3} for the first solution and (2∙2∙5)^{3} for the second. 
