Menu Close

How-many-ways-can-2018-be-expressed-as-the-sum-of-two-squares-




Question Number 110895 by Aina Samuel Temidayo last updated on 31/Aug/20
How many ways can 2018 be  expressed as the sum of two squares?
$$\mathrm{How}\:\mathrm{many}\:\mathrm{ways}\:\mathrm{can}\:\mathrm{2018}\:\mathrm{be} \\ $$$$\mathrm{expressed}\:\mathrm{as}\:\mathrm{the}\:\mathrm{sum}\:\mathrm{of}\:\mathrm{two}\:\mathrm{squares}? \\ $$
Answered by ajfour last updated on 31/Aug/20
43^2 +13^2 =2018
$$\mathrm{43}^{\mathrm{2}} +\mathrm{13}^{\mathrm{2}} =\mathrm{2018} \\ $$
Answered by floor(10²Eta[1]) last updated on 31/Aug/20
y=(√(2018−x^2 ))⇒x<45 and y<45  x^2 +y^2 =2018⇒(x+y)^2 =2(1009+xy)  (x+y)^2  is even ⇒(x+y) is even.  suppose x and y are even  x=2a and y=2b  (2a+2b)^2 =2(1009+(2a)(2b))  ⇒2(a^2 +b^2 )=1009  but 1009 is not even so x and y can′t be even.  ⇒ x and y are odd.  gcd(x,y)=d⇒x=ds, y=dt, gcd(s, t)=1  d^2 (s^2 +t^2 )=2018  d^2 ∣2018⇒d^2 ∈{1, 2, 1009, 2018}⇒d=1  so x and y are coprimes   x,y∈(1,3,5,7,...,43)  with that you can try to solve the problem  by testing but i will continue to think  and try to get a better way
$$\mathrm{y}=\sqrt{\mathrm{2018}−\mathrm{x}^{\mathrm{2}} }\Rightarrow\mathrm{x}<\mathrm{45}\:\mathrm{and}\:\mathrm{y}<\mathrm{45} \\ $$$$\mathrm{x}^{\mathrm{2}} +\mathrm{y}^{\mathrm{2}} =\mathrm{2018}\Rightarrow\left(\mathrm{x}+\mathrm{y}\right)^{\mathrm{2}} =\mathrm{2}\left(\mathrm{1009}+\mathrm{xy}\right) \\ $$$$\left(\mathrm{x}+\mathrm{y}\right)^{\mathrm{2}} \:\mathrm{is}\:\mathrm{even}\:\Rightarrow\left(\mathrm{x}+\mathrm{y}\right)\:\mathrm{is}\:\mathrm{even}. \\ $$$$\mathrm{suppose}\:\mathrm{x}\:\mathrm{and}\:\mathrm{y}\:\mathrm{are}\:\mathrm{even} \\ $$$$\mathrm{x}=\mathrm{2a}\:\mathrm{and}\:\mathrm{y}=\mathrm{2b} \\ $$$$\left(\mathrm{2a}+\mathrm{2b}\right)^{\mathrm{2}} =\mathrm{2}\left(\mathrm{1009}+\left(\mathrm{2a}\right)\left(\mathrm{2b}\right)\right) \\ $$$$\Rightarrow\mathrm{2}\left(\mathrm{a}^{\mathrm{2}} +\mathrm{b}^{\mathrm{2}} \right)=\mathrm{1009} \\ $$$$\mathrm{but}\:\mathrm{1009}\:\mathrm{is}\:\mathrm{not}\:\mathrm{even}\:\mathrm{so}\:\mathrm{x}\:\mathrm{and}\:\mathrm{y}\:\mathrm{can}'\mathrm{t}\:\mathrm{be}\:\mathrm{even}. \\ $$$$\Rightarrow\:\mathrm{x}\:\mathrm{and}\:\mathrm{y}\:\mathrm{are}\:\mathrm{odd}. \\ $$$$\mathrm{gcd}\left(\mathrm{x},\mathrm{y}\right)=\mathrm{d}\Rightarrow\mathrm{x}=\mathrm{ds},\:\mathrm{y}=\mathrm{dt},\:\mathrm{gcd}\left(\mathrm{s},\:\mathrm{t}\right)=\mathrm{1} \\ $$$$\mathrm{d}^{\mathrm{2}} \left(\mathrm{s}^{\mathrm{2}} +\mathrm{t}^{\mathrm{2}} \right)=\mathrm{2018} \\ $$$$\mathrm{d}^{\mathrm{2}} \mid\mathrm{2018}\Rightarrow\mathrm{d}^{\mathrm{2}} \in\left\{\mathrm{1},\:\mathrm{2},\:\mathrm{1009},\:\mathrm{2018}\right\}\Rightarrow\mathrm{d}=\mathrm{1} \\ $$$$\mathrm{so}\:\mathrm{x}\:\mathrm{and}\:\mathrm{y}\:\mathrm{are}\:\mathrm{coprimes}\: \\ $$$$\mathrm{x},\mathrm{y}\in\left(\mathrm{1},\mathrm{3},\mathrm{5},\mathrm{7},…,\mathrm{43}\right) \\ $$$$\mathrm{with}\:\mathrm{that}\:\mathrm{you}\:\mathrm{can}\:\mathrm{try}\:\mathrm{to}\:\mathrm{solve}\:\mathrm{the}\:\mathrm{problem} \\ $$$$\mathrm{by}\:\mathrm{testing}\:\mathrm{but}\:\mathrm{i}\:\mathrm{will}\:\mathrm{continue}\:\mathrm{to}\:\mathrm{think} \\ $$$$\mathrm{and}\:\mathrm{try}\:\mathrm{to}\:\mathrm{get}\:\mathrm{a}\:\mathrm{better}\:\mathrm{way} \\ $$$$ \\ $$
Commented by Aina Samuel Temidayo last updated on 31/Aug/20
Thanks
$$\mathrm{Thanks} \\ $$
Answered by Rasheed.Sindhi last updated on 01/Sep/20
(i) unit-digits.  (ii)squares of unit-digits.  (iii)unit-digits of squares   [((  (i)),0,1,2,3,( 4),( 5),( 6),( 7),( 8),( 9)),(( (ii)),0,1,4,9,(16),(25),(36),(49),(64),(81)),(((iii)),0,1,4,9,( 6),( 5),( 6),( 9),( 4),( 1)) ]        is sum of two square numbers.  Hence its unit-digit(8) is made up  of sum of unit-digits of squares   Only two possibilities:  4+4=8 & 9+9=18  ^• 4 is square of  unit-digits: 2 & 8  ^• 9 is square of  unit-digits: 3 & 7  Search for the numbers is  narrow enough now: Only  numbers with units 2,8,3 & 7  So finally 3 is successful  candidate. If n is one possible  candidate for required numbers  other number N is              N=(√(2018−n))  provided that 2018−n is prefect  squre.  Finally 13^2 +43^2 =2018 only  solution.
$$\left(\mathrm{i}\right)\:\mathrm{unit}-\mathrm{digits}. \\ $$$$\left(\mathrm{ii}\right)\mathrm{squares}\:\mathrm{of}\:\mathrm{unit}-\mathrm{digits}. \\ $$$$\left(\mathrm{iii}\right)\mathrm{unit}-\mathrm{digits}\:\mathrm{of}\:\mathrm{squares} \\ $$$$\begin{bmatrix}{\:\:\left(\mathrm{i}\right)}&{\mathrm{0}}&{\mathrm{1}}&{\mathrm{2}}&{\mathrm{3}}&{\:\mathrm{4}}&{\:\mathrm{5}}&{\:\mathrm{6}}&{\:\mathrm{7}}&{\:\mathrm{8}}&{\:\mathrm{9}}\\{\:\left(\mathrm{ii}\right)}&{\mathrm{0}}&{\mathrm{1}}&{\mathrm{4}}&{\mathrm{9}}&{\mathrm{16}}&{\mathrm{25}}&{\mathrm{36}}&{\mathrm{49}}&{\mathrm{64}}&{\mathrm{81}}\\{\left(\mathrm{iii}\right)}&{\mathrm{0}}&{\mathrm{1}}&{\mathrm{4}}&{\mathrm{9}}&{\:\mathrm{6}}&{\:\mathrm{5}}&{\:\mathrm{6}}&{\:\mathrm{9}}&{\:\mathrm{4}}&{\:\mathrm{1}}\end{bmatrix}\: \\ $$$$ \:{is}\:{sum}\:{of}\:{two}\:{square}\:{numbers}. \\ $$$${Hence}\:{its}\:{unit}-{digit}\left(\mathrm{8}\right)\:{is}\:{made}\:{up} \\ $$$${of}\:{sum}\:{of}\:{unit}-{digits}\:{of}\:{squares} \\ $$$$\:{Only}\:{two}\:{possibilities}: \\ $$$$\mathrm{4}+\mathrm{4}=\mathrm{8}\:\&\:\mathrm{9}+\mathrm{9}=\mathrm{18} \\ $$$$\:^{\bullet} \mathrm{4}\:{is}\:{square}\:{of}\:\:{unit}-{digits}:\:\mathrm{2}\:\&\:\mathrm{8} \\ $$$$\:^{\bullet} \mathrm{9}\:{is}\:{square}\:{of}\:\:{unit}-{digits}:\:\mathrm{3}\:\&\:\mathrm{7} \\ $$$${Search}\:{for}\:{the}\:{numbers}\:{is} \\ $$$${narrow}\:{enough}\:{now}:\:{Only} \\ $$$${numbers}\:{with}\:{units}\:\mathrm{2},\mathrm{8},\mathrm{3}\:\&\:\mathrm{7} \\ $$$${So}\:{finally}\:\mathrm{3}\:{is}\:{successful} \\ $$$${candidate}.\:{If}\:{n}\:{is}\:{one}\:{possible} \\ $$$${candidate}\:{for}\:{required}\:{numbers} \\ $$$${other}\:{number}\:{N}\:{is} \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:{N}=\sqrt{\mathrm{2018}−{n}} \\ $$$${provided}\:{that}\:\mathrm{2018}−{n}\:{is}\:{prefect} \\ $$$${squre}. \\ $$$${Finally}\:\mathrm{13}^{\mathrm{2}} +\mathrm{43}^{\mathrm{2}} =\mathrm{2018}\:{only} \\ $$$${solution}. \\ $$
Commented by floor(10²Eta[1]) last updated on 01/Sep/20
cool!! with that and knowing that  the numbers are both odd helps a lot  because we just have to look for  the numbers(3, 7, 13, 17, 23, 27, 33, 37, 43)
$$\mathrm{cool}!!\:\mathrm{with}\:\mathrm{that}\:\mathrm{and}\:\mathrm{knowing}\:\mathrm{that} \\ $$$$\mathrm{the}\:\mathrm{numbers}\:\mathrm{are}\:\mathrm{both}\:\mathrm{odd}\:\mathrm{helps}\:\mathrm{a}\:\mathrm{lot} \\ $$$$\mathrm{because}\:\mathrm{we}\:\mathrm{just}\:\mathrm{have}\:\mathrm{to}\:\mathrm{look}\:\mathrm{for} \\ $$$$\mathrm{the}\:\mathrm{numbers}\left(\mathrm{3},\:\mathrm{7},\:\mathrm{13},\:\mathrm{17},\:\mathrm{23},\:\mathrm{27},\:\mathrm{33},\:\mathrm{37},\:\mathrm{43}\right) \\ $$$$ \\ $$
Commented by Rasheed.Sindhi last updated on 01/Sep/20
Thanks floor sir!
$$\mathbb{T}\mathrm{han}\Bbbk\mathrm{s}\:\boldsymbol{\mathrm{floor}}\:\boldsymbol{\mathrm{sir}}! \\ $$

Leave a Reply

Your email address will not be published. Required fields are marked *