Maths Olympiad Prep

Library / Mongolian Mathematical Olympiad /96 of 97

Mongolian Mathematical Olympiad

Algebra Difficulty 7.5 National Olympiad, round 2 Prove it Mongolia

Let AA be the sum of the squares of three consecutive positive integers, and let BB be the sum of the squares of four consecutive positive integers. Determine the number of pairs (A,B)(A, B) that satisfy the equation 3A−B=20253A - B = 2025. (Batzorig Undrakh)

Solution

Let the three consecutive positive integers be nn, n+1n+1, n+2n+2.
Then
A=n2+(n+1)2+(n+2)2=n2+n2+2n+1+n2+4n+4=3n2+6n+5. A = n^2 + (n+1)^2 + (n+2)^2 = n^2 + n^2 + 2n + 1 + n^2 + 4n + 4 = 3n^2 + 6n + 5.

Let the four consecutive positive integers be mm, m+1m+1, m+2m+2, m+3m+3.
Then
B=m2+(m+1)2+(m+2)2+(m+3)2=m2+m2+2m+1+m2+4m+4+m2+6m+9=4m2+12m+14. B = m^2 + (m+1)^2 + (m+2)^2 + (m+3)^2 = m^2 + m^2 + 2m + 1 + m^2 + 4m + 4 + m^2 + 6m + 9 = 4m^2 + 12m + 14.

We are given:
3A−B=2025. 3A - B = 2025.
Substitute the expressions for AA and BB:
3(3n2+6n+5)−(4m2+12m+14)=2025 3(3n^2 + 6n + 5) - (4m^2 + 12m + 14) = 2025
9n2+18n+15−4m2−12m−14=2025 9n^2 + 18n + 15 - 4m^2 - 12m - 14 = 2025
9n2+18n+15=4m2+12m+14+2025 9n^2 + 18n + 15 = 4m^2 + 12m + 14 + 2025
9n2+18n+15=4m2+12m+2039 9n^2 + 18n + 15 = 4m^2 + 12m + 2039
9n2+18n+15−2039=4m2+12m 9n^2 + 18n + 15 - 2039 = 4m^2 + 12m
9n2+18n−2024=4m2+12m 9n^2 + 18n - 2024 = 4m^2 + 12m

Let us rearrange:
9n2+18n−2024=4m2+12m 9n^2 + 18n - 2024 = 4m^2 + 12m

Let k=nk = n.
Then 9k2+18k−2024=4m2+12m9k^2 + 18k - 2024 = 4m^2 + 12m.

Let us try to solve for integer solutions (n,m)(n, m).

Rewrite as:
9n2+18n−2024−4m2−12m=0 9n^2 + 18n - 2024 - 4m^2 - 12m = 0
9n2+18n−4m2−12m=2024 9n^2 + 18n - 4m^2 - 12m = 2024

Let us try to express mm in terms of nn:
9n2+18n−2024=4m2+12m 9n^2 + 18n - 2024 = 4m^2 + 12m
4m2+12m=9n2+18n−2024 4m^2 + 12m = 9n^2 + 18n - 2024
4m2+12m−(9n2+18n−2024)=0 4m^2 + 12m - (9n^2 + 18n - 2024) = 0

This is a quadratic in mm:
4m2+12m−(9n2+18n−2024)=0 4m^2 + 12m - (9n^2 + 18n - 2024) = 0
4m2+12m−9n2−18n+2024=0 4m^2 + 12m - 9n^2 - 18n + 2024 = 0
4m2+12m+(2024−9n2−18n)=0 4m^2 + 12m + (2024 - 9n^2 - 18n) = 0

So for each integer nn, mm must be integer and positive.

Let us solve for mm:
4m2+12m+(2024−9n2−18n)=0 4m^2 + 12m + (2024 - 9n^2 - 18n) = 0
4m2+12m+C=0 4m^2 + 12m + C = 0
where C=2024−9n2−18nC = 2024 - 9n^2 - 18n

This is a quadratic in mm:
4m2+12m+C=0 4m^2 + 12m + C = 0
The discriminant must be a perfect square:
Δ=122−4×4×C=144−16C \Delta = 12^2 - 4 \times 4 \times C = 144 - 16C
So 144−16C144 - 16C must be a perfect square.

Let D=144−16C=144−16(2024−9n2−18n)=144−16×2024+16×9n2+16×18nD = 144 - 16C = 144 - 16(2024 - 9n^2 - 18n) = 144 - 16 \times 2024 + 16 \times 9n^2 + 16 \times 18n
=144−32384+144n2+288n = 144 - 32384 + 144n^2 + 288n
=(144n2+288n)+(144−32384) = (144n^2 + 288n) + (144 - 32384)
=144n2+288n−32240 = 144n^2 + 288n - 32240

So D=144n2+288n−32240D = 144n^2 + 288n - 32240 must be a perfect square.
Let D=k2D = k^2 for some integer k≥0k \geq 0.

So:
144n2+288n−32240=k2 144n^2 + 288n - 32240 = k^2

Let us try to find integer solutions for nn and kk.

Let us try to estimate possible nn.

Set k2≥0k^2 \geq 0:
144n2+288n−32240≥0 144n^2 + 288n - 32240 \geq 0
144n2+288n≥32240 144n^2 + 288n \geq 32240
n2+2n≥32240144≈224 n^2 + 2n \geq \frac{32240}{144} \approx 224
So n2+2n−224≥0n^2 + 2n - 224 \geq 0

Solve n2+2n−224=0n^2 + 2n - 224 = 0
Δ=4+896=900 \Delta = 4 + 896 = 900
⇒n=−2±302=14,−16 \Rightarrow n = \frac{-2 \pm 30}{2} = 14, -16
So n≥14n \geq 14

Try n=14n = 14:
144×142+288×14−32240=144×196+4032−32240=28224+4032−32240=32256−32240=16 144 \times 14^2 + 288 \times 14 - 32240 = 144 \times 196 + 4032 - 32240 = 28224 + 4032 - 32240 = 32256 - 32240 = 16
So D=16=42D = 16 = 4^2
So k=4k = 4

So n=14n = 14 is a solution.

Now, for n=14n = 14, what is mm?
Recall:
4m2+12m+C=0 4m^2 + 12m + C = 0
where C=2024−9n2−18nC = 2024 - 9n^2 - 18n

Compute CC for n=14n = 14:
9×142=9×196=1764 9 \times 14^2 = 9 \times 196 = 1764
18 ×\times 14 = 252
C=2024−1764−252=2024−2016=8 C = 2024 - 1764 - 252 = 2024 - 2016 = 8
So 4m2+12m+8=04m^2 + 12m + 8 = 0

Solve:
4m2+12m+8=0 4m^2 + 12m + 8 = 0
m2+3m+2=0 m^2 + 3m + 2 = 0
(m+1)(m+2)=0 (m + 1)(m + 2) = 0
So m=−1m = -1 or m=−2m = -2
But mm must be positive integer, so no solution for mm.

But let's check the quadratic formula for mm:
m=−12±168=−12±48 m = \frac{-12 \pm \sqrt{16}}{8} = \frac{-12 \pm 4}{8}
m1=−12+48=−88=−1 m_1 = \frac{-12 + 4}{8} = \frac{-8}{8} = -1
m2=−12−48=−168=−2 m_2 = \frac{-12 - 4}{8} = \frac{-16}{8} = -2
So again, mm is negative.

So n=14n = 14 does not yield positive mm.

Try n=15n = 15:
144×225+288×15−32240=32400+4320−32240=36720−32240=4480 144 \times 225 + 288 \times 15 - 32240 = 32400 + 4320 - 32240 = 36720 - 32240 = 4480
Is 44804480 a perfect square? 4480≈66.96\sqrt{4480} \approx 66.96
No.

Try n=16n = 16:
144×256+288×16−32240=36864+4608−32240=41472−32240=9232 144 \times 256 + 288 \times 16 - 32240 = 36864 + 4608 - 32240 = 41472 - 32240 = 9232
9232≈96.08\sqrt{9232} \approx 96.08
No.

Try n=18n = 18:
144×324+288×18−32240=46656+5184−32240=51840−32240=19600 144 \times 324 + 288 \times 18 - 32240 = 46656 + 5184 - 32240 = 51840 - 32240 = 19600
19600=140\sqrt{19600} = 140
So n=18n = 18, k=140k = 140

Now, for n=18n = 18:
9×324=2916 9 \times 324 = 2916
18 ×\times 18 = 324
C=2024−2916−324=2024−3240=−1216 C = 2024 - 2916 - 324 = 2024 - 3240 = -1216
So 4m2+12m−1216=04m^2 + 12m - 1216 = 0

Solve:
4m2+12m−1216=0 4m^2 + 12m - 1216 = 0
Quadratic formula:
m=−12±122−4×4×(−1216)8 m = \frac{-12 \pm \sqrt{12^2 - 4 \times 4 \times (-1216)}}{8}
m=−12±144+194568=−12±196008=−12±1408 m = \frac{-12 \pm \sqrt{144 + 19456}}{8} = \frac{-12 \pm \sqrt{19600}}{8} = \frac{-12 \pm 140}{8}
So
m1=−12+1408=1288=16 m_1 = \frac{-12 + 140}{8} = \frac{128}{8} = 16
m2=−12−1408=−1528=−19 m_2 = \frac{-12 - 140}{8} = \frac{-152}{8} = -19
So m=16m = 16 is a positive integer solution.

So n=18n = 18, m=16m = 16 is a solution.

Try n=19n = 19:
144×361+288×19−32240=51984+5472−32240=57456−32240=25216 144 \times 361 + 288 \times 19 - 32240 = 51984 + 5472 - 32240 = 57456 - 32240 = 25216
25216≈158.8\sqrt{25216} \approx 158.8
No.

Try n=22n = 22:
144×484+288×22−32240=69796+6336−32240=76132−32240=43892 144 \times 484 + 288 \times 22 - 32240 = 69796 + 6336 - 32240 = 76132 - 32240 = 43892
43892≈209.5\sqrt{43892} \approx 209.5
No.

Try n=23n = 23:
144×529+288×23−32240=76176+6624−32240=82800−32240=50560 144 \times 529 + 288 \times 23 - 32240 = 76176 + 6624 - 32240 = 82800 - 32240 = 50560
50560≈224.9\sqrt{50560} \approx 224.9
No.

Try n=25n = 25:
144×625+288×25−32240=90000+7200−32240=97200−32240=64960 144 \times 625 + 288 \times 25 - 32240 = 90000 + 7200 - 32240 = 97200 - 32240 = 64960
64960≈254.9\sqrt{64960} \approx 254.9
No.

Try n=28n = 28:
144×784+288×28−32240=112896+8064−32240=120960−32240=88640 144 \times 784 + 288 \times 28 - 32240 = 112896 + 8064 - 32240 = 120960 - 32240 = 88640
88640≈298.7\sqrt{88640} \approx 298.7
No.

Try n=34n = 34:
144×1156+288×34−32240=166464+9792−32240=176256−32240=144016 144 \times 1156 + 288 \times 34 - 32240 = 166464 + 9792 - 32240 = 176256 - 32240 = 144016
144016≈379.5\sqrt{144016} \approx 379.5
No.

Try n=38n = 38:
144×1444+288×38−32240=208,032+10,944−32,240=218,976−32,240=186,736 144 \times 1444 + 288 \times 38 - 32240 = 208,032 + 10,944 - 32,240 = 218,976 - 32,240 = 186,736
186736≈432.1\sqrt{186736} \approx 432.1
No.

Try n=43n = 43:
144×1849+288×43−32240=266,256+12,384−32,240=278,640−32,240=246,400 144 \times 1849 + 288 \times 43 - 32240 = 266,256 + 12,384 - 32,240 = 278,640 - 32,240 = 246,400
246400=496\sqrt{246400} = 496
So n=43n = 43, k=496k = 496

Now, for n=43n = 43:
9×1849=16641 9 \times 1849 = 16641
18 ×\times 43 = 774
C=2024−16641−774=2024−17415=−15391 C = 2024 - 16641 - 774 = 2024 - 17415 = -15391
So 4m2+12m−15391=04m^2 + 12m - 15391 = 0

Quadratic formula:
m=−12±122−4×4×(−15391)8 m = \frac{-12 \pm \sqrt{12^2 - 4 \times 4 \times (-15391)}}{8}
m=−12±144+2462568=−12±2464008=−12±4968 m = \frac{-12 \pm \sqrt{144 + 246256}}{8} = \frac{-12 \pm \sqrt{246400}}{8} = \frac{-12 \pm 496}{8}
So
m1=−12+4968=4848=60.5 m_1 = \frac{-12 + 496}{8} = \frac{484}{8} = 60.5
m2=−12−4968=−5088=−63.5 m_2 = \frac{-12 - 496}{8} = \frac{-508}{8} = -63.5
So mm is not integer.

Try n=50n = 50:
144×2500+288×50−32240=360,000+14,400−32,240=374,400−32,240=342,160 144 \times 2500 + 288 \times 50 - 32240 = 360,000 + 14,400 - 32,240 = 374,400 - 32,240 = 342,160
342160≈584.8\sqrt{342160} \approx 584.8
No.

Try n=68n = 68:
144×4624+288×68−32240=666,816+19,584−32,240=686,400−32,240=654,160 144 \times 4624 + 288 \times 68 - 32240 = 666,816 + 19,584 - 32,240 = 686,400 - 32,240 = 654,160
654160≈809.5\sqrt{654160} \approx 809.5
No.

Try n=70n = 70:
144×4900+288×70−32240=705,600+20,160−32,240=725,760−32,240=693,520 144 \times 4900 + 288 \times 70 - 32240 = 705,600 + 20,160 - 32,240 = 725,760 - 32,240 = 693,520
693520≈833.1\sqrt{693520} \approx 833.1
No.

Try n=75n = 75:
144×5625+288×75−32240=810,000+21,600−32,240=831,600−32,240=799,360 144 \times 5625 + 288 \times 75 - 32240 = 810,000 + 21,600 - 32,240 = 831,600 - 32,240 = 799,360
799360≈894.1\sqrt{799360} \approx 894.1
No.

Try n=80n = 80:
144×6400+288×80−32240=921,600+23,040−32,240=944,640−32,240=912,400 144 \times 6400 + 288 \times 80 - 32240 = 921,600 + 23,040 - 32,240 = 944,640 - 32,240 = 912,400
912400=956\sqrt{912400} = 956
So n=80n = 80, k=956k = 956

Now, for n=80n = 80:
9×6400=57,600 9 \times 6400 = 57,600
18 ×\times 80 = 1,440
C=2024−57,600−1,440=2024−59,040=−57,016 C = 2024 - 57,600 - 1,440 = 2024 - 59,040 = -57,016
So 4m2+12m−57,016=04m^2 + 12m - 57,016 = 0

Quadratic formula:
m=−12±122−4×4×(−57,016)8 m = \frac{-12 \pm \sqrt{12^2 - 4 \times 4 \times (-57,016)}}{8}
m=−12±144+912,2568=−12±912,4008=−12±9568 m = \frac{-12 \pm \sqrt{144 + 912,256}}{8} = \frac{-12 \pm \sqrt{912,400}}{8} = \frac{-12 \pm 956}{8}
So
m1=−12+9568=9448=118 m_1 = \frac{-12 + 956}{8} = \frac{944}{8} = 118
m2=−12−9568=−9688=−121 m_2 = \frac{-12 - 956}{8} = \frac{-968}{8} = -121
So m=118m = 118 is a positive integer solution.

Thus, we have found two solutions:
1. n=18n = 18, m=16m = 16
2. n=80n = 80, m=118m = 118

Let us check for negative nn (but nn must be positive integer).

Let us check for nn such that DD is a perfect square and mm is positive integer.

From the above, the only positive integer solutions are (n,m)=(18,16)(n, m) = (18, 16) and (80,118)(80, 118).

Therefore, the number of pairs (A,B)(A, B) that satisfy the equation is 2\boxed{2}.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.