Created
February 2, 2016 18:06
-
-
Save Radcliffe/e36f9282edc5963bb4a1 to your computer and use it in GitHub Desktop.
Solution to Crux Mathematicorum M379
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Problem M379, Crux Mathematicorum | |
Proposed by John Grant McLoughlin, University of New Brunswkci, | |
Fredericton, NB. | |
The integers 27+C, 555+C, and 1371+C are all perfect squares, the square | |
roots of which form an arithmetic sequence. Determine all possible values | |
of C. | |
""" | |
from sympy.solvers import solve | |
from sympy import symbols | |
x, y, C = symbols('x y C') | |
system = [(x - y)**2 - (27 + C), | |
x**2 - (555 + C), | |
(x + y)**2 - (1371 + C)] | |
print solve(system) | |
# Expected output: [{C: 229, x: -28, y: -12}, {C: 229, x: 28, y: 12}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to solve the following system of equations.
The reader can verify that
Therefore, 2y^2 = 288, and so y = 12.
Furthermore,
hence 4xy = 1344, and so x = 1344 / 48 = 28. Since x^2 = 555 + C, we conclude that C = 28^2 - 555 = 229.