Difference between revisions of "2004 OIM Problems/Problem 4"
(Created page with "== Problem == Find all pairs <math>(a, b)</math>, where <math>a</math> and <math>b</math> are positive integers of two digits each, such that <math>100a + b</math> and <math>2...") |
(solution) |
||
Line 5: | Line 5: | ||
== Solution == | == Solution == | ||
− | {{solution} | + | Let <math>100a+b=x^2</math> and <math>201a+b=y^2</math>; then, by subtracting, <math>y^2-x^2=101a</math>, so <math>(y+x)(y-x)=101a</math>. Notice that since <math>x^2</math> and <math>y^2</math> are four-digit, <math>x^2,y^2<10000</math>, so <math>x,y<100</math>. Thus <math>x+y<200</math>. |
+ | |||
+ | Clearly <math>y>x</math>, so both <math>y+x</math> and <math>y-x</math> are positive; however, as <math>y-x</math> cannot equal <math>101</math> due to <math>x,y<100</math>, we must have <math>101|(y+x)</math>. Since <math>x+y\ne0</math> and <math>x+y<200<202</math>, it is necessary that <math>x+y=101</math>. Then <math>y-x=a</math>. Solving for <math>x</math> and <math>y</math> results in | ||
+ | <cmath>x=\frac{101-a}{2},y=\frac{101+a}{2}</cmath> | ||
+ | Substituting back in: | ||
+ | <cmath>100a+b=\left(\frac{101-a}{2}\right)^2</cmath> | ||
+ | <cmath>201a+b=\left(\frac{101+a}{2}\right)^2</cmath> | ||
+ | From the second equation, rearranging yields | ||
+ | <cmath>a^2-602a+101^2-4b=0</cmath> | ||
+ | Using the [[Quadratic Formula]]: | ||
+ | \begin{align*} | ||
+ | a&=\frac{602\pm\sqrt{602^2-4(101^2-4b)}}{2}\ | ||
+ | &=\frac{602\pm2\sqrt{301^2-(101^2-4b)}}{2}\ | ||
+ | &=\frac{602\pm2\sqrt{4b+301^2-101^2}}{2}\ | ||
+ | &=\frac{602\pm2\sqrt{4b+402\cdot200}}{2}\ | ||
+ | &=\frac{602\pm4\sqrt{b+402\cdot50}}{2}\ | ||
+ | &=\frac{602\pm4\sqrt{b+20100}}{2}\ | ||
+ | \end{align*} | ||
+ | Clearly <math>b+20100</math> must be a perfect square, and the only perfect square that allows <math>b</math> to have two digits is <math>142^2=20164</math>. Thus <math>b=64</math>, and: | ||
+ | \begin{align*} | ||
+ | a&=\frac{602\pm4\sqrt{b+20100}}{2}\ | ||
+ | &=\frac{602\pm4\cdot142}{2}\ | ||
+ | &=\frac{602\pm568}{2}\ | ||
+ | &=\frac{602-568}{2}\ | ||
+ | &=\frac{34}{2}\ | ||
+ | &=17\ | ||
+ | \end{align*} | ||
+ | Thus the only solution is <math>(a,b)=\boxed{(17,64)}</math>, which works (testing yields the two squares <math>42^2=1764</math> and <math>59^2=3481</math>). | ||
+ | |||
+ | ~ [https://artofproblemsolving.com/wiki/index.php/User:Eevee9406 eevee9406] | ||
== See also == | == See also == | ||
[[OIM Problems and Solutions]] | [[OIM Problems and Solutions]] |
Latest revision as of 22:53, 25 March 2025
Problem
Find all pairs , where
and
are positive integers of two digits each, such that
and
are four-digit perfect squares.
~translated into English by Tomas Diaz. ~orders@tomasdiaz.com
Solution
Let and
; then, by subtracting,
, so
. Notice that since
and
are four-digit,
, so
. Thus
.
Clearly , so both
and
are positive; however, as
cannot equal
due to
, we must have
. Since
and
, it is necessary that
. Then
. Solving for
and
results in
Substituting back in:
From the second equation, rearranging yields
Using the Quadratic Formula:
must be a perfect square, and the only perfect square that allows
to have two digits is
. Thus
, and:
, which works (testing yields the two squares
and
).