Mr 7 challange you!

a a and b b are positive integers such that a 2 + b 2 a^2+b^2 is divisible by 7. 7.

Are both a a and b b always divisible by 7 ? 7?

Yes No

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

17 solutions

Arjen Vreugdenhil
Jul 22, 2018

The squares modulo 7 are 0 2 0 1 2 ( 1 ) 2 1 2 2 ( 2 ) 2 3 3 2 ( 3 ) 2 2 . \begin{aligned} 0^2 & \equiv 0 \\ 1^2 \equiv (-1)^2 & \equiv 1 \\ 2^2 \equiv (-2)^2 & \equiv -3 \\ 3^2 \equiv (-3)^2 & \equiv 2 \end{aligned}. The only way in which we can add two of these squares to obtain 0 0 modulo 7 is 0 2 + 0 2 0 + 0 0. 0^2 + 0^2 \equiv 0 + 0 \equiv 0. In other words, both squares are squares of multiples of 7.

I don't understand the concept of modulo

Simran Nahar - 2 years, 10 months ago

Log in to reply

In brief, the statement " 2 2 3 mod 7 2^2 \equiv -3\ \text{mod}\ 7 " is shorthand for if n = 7 k + 2 for some k , then n 2 = 7 k + ( 3 ) for some k . \text{if}\ n = 7k + 2\ \text{for some}\ k,\ \ \text{then} \ \ n^2 = 7k' + (-3)\ \text{for some}\ k'. See for more on this page .

Arjen Vreugdenhil - 2 years, 10 months ago

I think that it's necessary prove that the squares modulo 7 are those

Carlos Céspedes - 2 years, 10 months ago

Log in to reply

Every number possible is listed (0, 1, 2, 3, -3, -2, -1). In modulo 7, -3 and 4 are equivalent, -2 and 5 are equivalent, as are -1 and 6. I'm otherwise not clear what you mean.

Jason Dyer Staff - 2 years, 10 months ago

Why do you only look at {0, 1, 2, 3} squared, and not at {0, 1, 2, 3, 4, 5, 6} squared?

Vadim Rumyantsev - 2 years, 10 months ago

Log in to reply

Modulo 7, 4 3 4 \equiv -3 , and I checked that ( 3 ) 2 2 (-3)^2 \equiv 2 mod 7.

The fact that a 2 ( a ) 2 a^2 \equiv (-a)^2 saves us some work here!

Arjen Vreugdenhil - 2 years, 10 months ago

leta,b both are diviseable by 7. so,a+b,ab are diviseable by7 (a+b)^2=a^2+2ab+b^2 so,a^2+b^2=(a+b)^2-2ab,which is in favour.so,ans is yes

ridoy k - 2 years, 9 months ago
El Amine Regragui
Jun 30, 2018

every square have as a remainder mod 7 only one of the values 0 or 1 or 2 or 4, 7 can be write only like the sum of the (7 and 0) or (6 and 1) or (5 and 2) or (4 and 3), so (7 and 0) is the only valid way to verified the condition of the exercice, a² and b² must be each devisible by 7 , like 7 is a prime number (or in genetral a number with an odd exponent on all prime factors) , a and b must be each devisible by 7 .

Have you misspelt challenge in the name of the problem?

Stephen Mellor - 2 years, 10 months ago

Can you please explain the : a^2 and b^2 each divisible by 7 then, because 7 is prime, a and b divisible by 7. Thank you

Cyril Gauthier - 2 years, 10 months ago

Log in to reply

continue... please.

Dane Kasih - 2 years, 10 months ago

If i well interprete what this young prodige said : if a² and b² are not divisible by 7, one of them is congru to 1 modulo 7, the other to 6 (impossible, the only congruences are 1, 4, 2 if not divisibles by 7), OR one congru to 2 modulo 7, the other to 5 (impossible), etc. So both a² and b² are divisible by seven. Then a and b divisible by seven.

Leonblum Iznotded - 2 years, 10 months ago

Log in to reply

Thank you my fellow french mate ! I still got trouble understanding the "(or in genetral a number with an odd exponent on all prime factors) , a and b must be each devisible by 7 ." I can't find any proof that state : If a^2 is divisible by k (which is prime) ; then a is divisible by k..

Cyril Gauthier - 2 years, 10 months ago

Log in to reply

I think you talk about Gauss theorem http://uel.unisciel.fr/mathematiques/arithmetique/arithmetique ch03/co/apprendre ch3_04.html if a divides bc and a coprime with b then a divides c. In our case, if 7 divides a², then (first case, reduction ad absurdum, if 7 is coprime with "a" then 7 is coprime with a². Absurd. So only second case : 7 has a common divisor with a, that is 7.)

Leonblum Iznotded - 2 years, 10 months ago

Log in to reply

@Leonblum Iznotded Finally understood ! Merci beaucoup pour ton temps Leonblum

Cyril Gauthier - 2 years, 10 months ago
Brian Moehring
Jul 2, 2018

Since 7 is prime, this is actually equivalent to the statement 1 is a quadratic nonresidue modulo 7 -1 \text{ is a quadratic nonresidue modulo } 7

For moderately sized primes or primes of special form, it would be best to investigate this using the tools for quadratic residues, but in our case, we can just list the nonzero quadratic residues as 1 2 1 ( m o d 7 ) 2 2 4 ( m o d 7 ) 3 2 2 ( m o d 7 ) 1^2 \equiv 1 \pmod{7} \\ 2^2 \equiv 4 \pmod{7} \\ 3^2 \equiv 2 \pmod{7}

Note that 1 6 ( m o d 7 ) -1 \equiv 6 \pmod{7} doesn't appear, so the answer is True \boxed{\text{True}}

Can you explain statement about equality this problem to quadratic residue problem.It follows that x^2+1=0 (mod 7). We can rewrite as (a*b^-1)^2+1=0 (mod 7). Hmmm. I think I understand. Thx :)

Cde Lags - 2 years, 10 months ago

Log in to reply

Yes. For anyone else, the full details are:

  • If b 0 ( m o d 7 ) b \equiv 0 \pmod{7} , then as 7 7 is a prime, a 2 a 2 + b 2 0 ( m o d 7 ) a 0 ( m o d 7 ) a^2 \equiv a^2 + b^2 \equiv 0 \pmod{7} \implies a\equiv 0 \pmod{7} . That is, in this case both a , b a,b are multiples of 7 7 .
  • If b ≢ 0 ( m o d 7 ) b \not\equiv 0 \pmod{7} , then as 7 7 is a prime, b b has an inverse b 1 b^{-1} mod 7 7 . Then multiplying both sides of a 2 + b 2 0 ( m o d 7 ) a^2 + b^2 \equiv 0 \pmod{7} by ( b 1 ) 2 (b^{-1})^2 gives ( a b 1 ) 2 + 1 0 ( m o d 7 ) \left(ab^{-1}\right)^2 + 1 \equiv 0 \pmod{7} . Therefore 1 ( a b 1 ) 2 ( m o d 7 ) -1 \equiv \left(ab^{-1}\right)^2 \pmod{7} would be a quadratic residue.

Therefore, we just need to investigate whether 1 -1 is a quadratic residue mod 7 7 .

This works for any prime. That is, if you want to investigate whether a 2 + b 2 0 ( m o d p ) a^2 + b^2 \equiv 0 \pmod{p} has nonzero solutions when p p is a prime, you just need to see whether there is a solution to x 2 1 ( m o d p ) x^2 \equiv -1 \pmod{p} (anyone who knows quadratic reciprocity should immediately recognize this is equivalent to p 1 ( m o d 4 ) p \equiv 1 \pmod{4} , which makes the original problem trivially about seeing 7 3 ( m o d 4 ) 7 \equiv 3 \pmod{4} ).

Brian Moehring - 2 years, 10 months ago
Steven Gottlieb
Jul 24, 2018

Suppose a = 7m+r, 0<r<7 and b= 7n +s, 0<s<7. Then a^2 + b^2 = (7m+r)^2 + (7n+s)^2 = (49m^2 + 14mr + r^2) + (49n^2 + 14ns + s^2) = 49(m^2+n^2+ 14(mr +ns) + (r^2+s^2) which is divisible by 7 iff r^2+s^2 is divisible by 7. So now we do the same for r^2+s^2 and we obtain that this is divisible by 7 iff r'^2+s'^2 is divisible by 7. This will go on for ever, but it can't since with finite integers we can't lower them for ever, So the answer is yes, a and b must be divisible by 7.

Nice answer but you left out a ) in your algebra.

Terry Smith - 2 years, 10 months ago

Your explanation made sense to me. It is pure logic since we now have to find a positive r and an s smaller than 7 that will do this. So that can work for any prime. So since we know 4 & 3 works with 5 there it will not be the case. 11 will be the same again. Thanks I like your way of thinking.

Christiaan van Schalkwyk - 2 years, 10 months ago

I did it the same way. In fact (r^2 + s^2) "doesn´t go for ever", since "r" and "s" range each from 0 to 6, and we can check that the unique pair from (0, 0) to (6, 6) which leads (r^2 + s^2) to a multiple of 7 is (0, 0), and thus "a" and "b" must be a multiple of 7.

PAULO BOUHID - 2 years, 10 months ago
Sv Aj
Jul 27, 2018

a 2 + b 2 = 7 n a^2+b^2 = 7n ; this is the given fact, n n is a positive integer.

One can assume that a = 7 r a = 7r and b = 7 t b = 7t ; where r r and t t are both positive integers; this says that a a & b b are both divisible by 7 7 .

Applying the given fact: a 2 + b 2 = 7 n a^2+b^2 = 7n \rightarrow ( 7 r ) 2 + ( 7 t ) 2 = 7 n (7r)^2+(7t)^2 = 7n \rightarrow 7 2 ( r 2 + t 2 ) = 7 n 7^2(r^2+t^2) = 7n \Rightarrow 7 ( r 2 + t 2 ) = n \boxed{7(r^2+t^2) = n}

The last equation shows that yes both a a and b b can always be divisible by 7 7 since for some integer values to each of r r & t t , the variable n n will be an integer as well (and as it should be).

by far the most useful solution

Ali Al-Ali - 2 years, 10 months ago

The question is to prove that they MUST be divisible by 7; not that they can be. In order to prove this you cannot assume that your r,t exist.

Matt McNabb - 2 years, 10 months ago
Matt Miguel
Jul 23, 2018

From Euclid formula, pythagorean triples are generated from choices of m, n where m>n>0.

a=m^2-n^2

b=2mn

c=m^2+n^2

This formula includes all primitive triplets.

For c^2 to be divisible by 7, c itself must be divisible by 7 since 7 is prime.

Thus one must find any number c, that is divisible by 7 that is the sum of two squares m^2+n^2.

Consider modulo 7 arithmetic. There are 7 digits, 0,1,2,3,4,5,6

The squares of these digits modulo 7 are 0,1,4,2,2,4,1 respectively.

There is no way to combine any two these numbers with addition modulo 7 to obtain 0.

Therefore no two squares sum to any number divisible by 7. Therefore no pythagorean triple may be generated by Euclid formula such that c^2 is divisible by 7. Since Euclid formula includes all primitive triples, there are no primitive triples with c^2 divisible by 7. Any non-primitive triple with c^2 divisible by 7 must be a scaled version of a primitive triple where the scaling factor is divisible by 7, but in that case, a and b are also scaled by the same factor and must also be divisible by 7.

Example: 21^2+28^2=35^2 is really primitive 3,4,5 scaled by 7.

Shiva Kumar k
Jul 23, 2018

When we divide a square number by 7, the possible remainders are 0,1,2,4. So, when we divide a^2 by 7 and b^2 by 7 individually ,we get the remainders 0,1,2 or 4. Possible remainders: when a^2 is divided by 7 are [0,1,2,4] and when b^2 is divided by 7 are [0,1,2,4]. Given that a^2+b^2 is divisible by 7,means the remainder is 0. So if we take all possible remainders and their sum pair wise ,should be divisible by 7. Out of all possibilities only 0+0=0 is divisible by 7. Therefore a and b always divisible by 7.

How did u know that the possible remainders are [0,1,2,4] ?

Elîte Keryakos - 2 years, 10 months ago
Carl Cristobal
Jul 26, 2018

If a 2 a^{2} + b 2 b^{2} is divisible by 7 7 , we can let

a 2 a^{2} = 7 k 7k

b 2 b^{2} = 7 j 7j

for some positive integers k k and j j .

Well actually, for a a and b b to be positive integers, k k and j j must be in the form 7 m 2 7m^{2} , where m 2 m^{2} is a perfect square, so that

a a = 7 k \sqrt{7k} = 7 ( 7 m 2 ) \sqrt{7(7m^{2})} = ( 7 m ) 2 \sqrt{(7m)^{2}} = 7 m 7m

b b = 7 j \sqrt{7j} = 7 ( 7 m 2 ) \sqrt{7(7m^{2})} = ( 7 m ) 2 \sqrt{(7m)^{2}} = 7 m 7m .

In this case, a a and b b are always divisible by 7 7 . Apparently, it would still hold true if we replace 7 7 with any positive integer n n .

Edwin Gray
Jul 11, 2018

Any prime divisor of a^2 + b^2 is of the form 4k + 1. Ed Gray

Let's see. If a = b = 7, a^2 + b^2 = 98. And 7 is a prime divisor of 98. But 7 is not of the form 4k + 1.

I think something is missing here.

Richard Desper - 2 years, 10 months ago
Simon Perez
Jul 27, 2018

if u consider a circle with a radius that's an integer multiple of 7 then any angle on that circle constructed from two lines through the center with integer solutions for its sin and cos will also be divisible by 7 because everything is just the unit circle scaled by some multiple of 7

Leonblum Iznotded
Jul 27, 2018

Gauss theorem is necessary to go quickly and efficiently though the squares(^²) of this problem : if "a" divides b × \times c and "a" coprime with b then a divides c. In our case, if 7 divides a², then (first case, reduction ad absurdum, if 7 is coprime with "a" then 7 is coprime with a². Absurd. So only second case : 7 has a common divisor with a, that is 7.)

The solution needs to list the a² mod 7 : if a €{1,2,3,4,5,6} (or congruent to them ; anyway, not 0, not multiple of 7)≡{1,2,3,-3,-2,-1}, then a²€{1,4,9,9,4,1}, congruent [mod 7] to {1,4,2,2,4,1}. Also b² congruent to €{1,4,2} if b not multiple of 7. The addition of a²+b² (really tried every sum of last two equal ensembles) is congruent to €{2,5,3,1,6,4} and gives not 0. Contradiction with a²+b² congru 0 [mod 7] (reductio ad absurdum).

Or by contraposition "a not multiple of 7, nor b" => "a²+b² not≡0 [mod 7]". So "a²+b²≡0[7]" => a² or b² multiple of 7. 7 is prime number, so a or b multiple of 7. Then a² or b² also. If a² multiple of 7, then b²=7n-a² also ; if b² multiple of 7, then a²=7n-b² also. * a²+b² is a multiple of 7. *

Jian Hau Chooi
Jul 23, 2018

Solution in Algebra \text{Solution in Algebra}

a 2 + b 2 = 7 k a = 7 k b 2 \begin{aligned} a^{2}+b^{2} &= 7k \\ a &= \sqrt{7k-b^{2}} \\ \end{aligned} Assume that: a + b = c 7 k b 2 = c b 7 k b 2 = c 2 2 b c + b 2 c 2 = 2 b 2 + 2 b c + 7 k c 2 = 2 ( a 2 7 k ) + 2 b c + 7 k 0 = c 2 2 b c 2 a 2 + 7 k c = 2 b + ( 2 b ) 2 4 ( 2 a 2 + 7 k ) 2 c = b + b 2 + 2 a 2 7 k c = b + b 2 + 2 a 2 ( a 2 + b 2 ) c = b + a 2 c = a + b \begin{aligned} a+b &= c \\ \sqrt{7k-b^{2}} &= c-b \\ 7k-b^{2} &= c^{2}-2bc+b^{2} \\ c^{2} &= -2b^{2}+2bc+7k \\ c^{2} &= 2(a^{2}-7k)+2bc+7k \\ 0 &= c^{2}-2bc-2a^{2}+7k \\ c &= \frac{2b+\sqrt{(-2b)^{2}-4(-2a^{2}+7k)}}{2} \\ c &= b+\sqrt{b^{2}+2a^{2}-7k} \\ c &= b+\sqrt{b^{2}+2a^{2}-(a^{2}+b^{2})} \\ c &= b+\sqrt{a^{2}} \\ c &= a+b \\ \end{aligned}

Thug Life LOL \large \text{Thug Life LOL}

MegaMoh .
May 20, 2019

a 2 + b 2 = 7 n a^2+b^2=7n so ( a + b i ) ( a b i ) = 7 n (a+bi)(a-bi) =7n so n = ( a + b i ) ( a b i ) 7 n=\frac{(a+bi)(a-bi)}{7} and because n n is an integer, ( a + b i ) ( a b i ) 7 \frac{(a+bi)(a-bi)}{7} must be an integer so 7 7 must divide it. Either a + b i a+bi or a b i a-bi contain 7 7 or a multiple of 7 7 or else the product won't give a 7 7 because it's prime, so either ( a + b i ) 7 \frac{(a+bi)}{7} or ( a b i ) 7 \frac{(a-bi)}{7} gives an integer. So either ( a 7 + b i 7 ) (\frac{a}{7}+\frac{bi}{7}) is an integer or ( a 7 b i 7 ) (\frac{a}{7}-\frac{bi}{7}) is an integer so a a must be divided evenly by 7 7 and so is b b because neither i i nor 1 -1 are divisible by 7 7

Leo Hansbauer
Jul 29, 2018

You can also get the solution with the Gaussian numbers (x + y i, x,y integers). Since numbers of the form 3 + 4k (where k is an integer) are prime elements, 7 is a prime element. Since a^2 + b^2 = (a + b i)(a - b i) and a^2 + b^2 = 7 x. 7 must be part of (a + b i) or (a - b i), thus it has to be part of a and b, since there is a unique factorization in the Gaussian numbers.

Akmam Hasan
Jul 28, 2018

every square have as a remainder mod 7 only one of the values 0 or 1 or 2 or 4, 7 can be write only like the sum of the (7 and 0) or (6 and 1) or (5 and 2) or (4 and 3), so (7 and 0) is the only valid way to verified the condition of the exercice, a² and b² must be each devisible by 7 , like 7 is a prime number (or in genetral a number with an odd exponent on all prime factors) , a and b must be each devisible by 7 .

Varun Gupta
Jul 28, 2018

I used to use this property in problems of PRMO, RMO, NMTC directly. 😂😂

Aaghaz Mahajan
Jun 30, 2018

Simply look in Mod 7............

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...