C L's number

Let M M be the smallest positive odd integer that is not a multiple of the square of any prime, and that can be expressed as a sum of squares of two integers in at least 4 4 distinct ways, ignoring signs and order. Find the last 3 digits of M M .

This problem is shared by C L .

Details and assumptions

If M = a 2 + b 2 M=a^2+b^2 , then ignoring signs and order implies M = ( a ) 2 + b 2 = b 2 + a 2 M = (-a)^2+b^2=b^2+a^2 are not counted as distinct.


The answer is 105.

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.

1 solution

Hưng Hồ
Aug 12, 2013

First we prove that M M only has prime divisor of the form 4 m + 1 4m+1 . Assume that there exists a prime p = 4 k + 3 p=4k+3 divides M = a 2 + b 2 M=a^2+b^2 . From the given condition, we know that if a a or b b is divisible by p p , it will result in M M is divisible by p 2 p^2 , a contradiction, so g c d ( a ; p ) = g c d ( b ; p ) = 1 gcd(a;p)=gcd(b;p)=1 . We have: a 2 b 2 ( m o d p ) a^2 \equiv -b^2 (mod p) a 4 k + 2 b 4 k + 2 ( m o d p ) \Leftrightarrow a^{4k+2} \equiv -b^{4k+2} (mod p) By Fermat's Little Theorem, it is equivalent to 1 1 ( m o d p ) 1 \equiv -1 (mod p) , a contradiction. So any prime divisor of M M must have the form 4 m + 1 4m+1 . We have M = p 1 p 2 p k M=p_1p_2…p_k , where p i p_i are distinct primes of the form 4 m + 1 4m+1 . We shall prove that k 3 k \geq 3 .

For k = 1 k=1 , since M = p 1 M=p_1 is a prime, according to the famous Fermat-Euler’s theorem, M M can only be expressed uniquely as the sum of 2 squares, so M M does not satisfy the given conditions.

For the case k = 2 k=2 , we have M = p 1 p 2 M=p_1p_2 , and because of Fermet-Euler’s theorem, we can write p 1 = x 2 + y 2 ; p 2 = u 2 + v 2 ( x > y ; u > v ) p_1=x^2+y^2; p_2=u^2+v^2 (x>y; u>v) . Now assume that M M can be expressed as the sum of two squares for more than 2 ways, that is M = a 2 + b 2 = c 2 + d 2 = e 2 + f 2 M=a^2+b^2=c^2+d^2=e^2+f^2 . We may suppose that a > c > e > f > d > b a>c>e>f>d>b . We have:
a 2 b 2 ( m o d M ) a^2 \equiv -b^2 (mod M) c 2 d 2 ( m o d M ) c^2 \equiv -d^2 (mod M)

Hence a 2 c 2 b 2 d 2 ( m o d M ) ( a c b d ) ( a c + b d ) a^2c^2 \equiv b^2d^2 (mod M) \Leftrightarrow (ac-bd)(ac+bd) is divisible by M M .

Since M 2 = ( a 2 + b 2 ) ( c 2 + d 2 ) ( a c + b d ) 2 ( a c b d ) 2 M^2 =(a^2+b^2)(c^2+d^2) \geq (ac+bd)^2 \geq (ac-bd)^2 , we cannot have M ( a c b d ) M|(ac-bd) or M ( a c + b d ) M|(ac+bd) , therefore exactly one of the two numbers ( a c b d ) , ( a c + b d ) (ac-bd),(ac+bd) is divisible by p 1 p_1 , and the other number is divisible by p 2 p_2 . Similarly we can deduce the same property for 2 numbers ( a d b c ) , ( a d + b c ) (ad-bc),(ad+bc) . Moreover, if both ( a d + b c ) (ad+bc) and ( a c + b d ) (ac+bd) is divisible by p 1 p_1 (or p 2 p_2 ), it will result in a 2 b 2 b 2 ( m o d p 1 ) a^2 \equiv b^2 \equiv -b^2 (mod p_1) , a contradiction. So WLOG we may assume that p 1 ( a d + b c ) p_1|(ad+bc) and p 2 ( a c + b d ) p_2|(ac+bd) , which also means that p 1 ( a c b d ) p_1|(ac-bd) and p 2 ( a d b c ) p_2|(ad-bc) . Write a c + b d = m p 2 ; a d b c = n p 2 ac+bd=mp_2; |ad-bc|=np_2 , we have p 1 2 p 2 2 = ( a c + b d ) 2 + ( a d b c ) 2 = p 2 2 ( m 2 + n 2 ) m 2 + n 2 = p 1 2 p_1^2p_2^2=(ac+bd)^2+(ad-bc)^2=p_2^2(m^2+n^2) \Rightarrow m^2+n^2=p_1^2 . This is Pythagorean equation, and since g c d ( m ; n ) = 1 gcd(m;n)=1 and p 1 p_1 can only be uniquely expressed as x 2 + y 2 x^2+y^2 , we must have { m ; n m;n }={ x 2 y 2 ; 2 x y x^2-y^2;2xy }.

Hence { a c + b d ; a d b c ac+bd;|ad-bc| } = { ( x 2 y 2 ) p 2 ; 2 x y p 2 (x^2-y^2)p_2;2xyp_2 }. Similarly, we can prove that { a d + b c ; a c b d ad+bc;ac-bd } = { ( u 2 v 2 ) p 1 ; 2 u v p 1 (u^2-v^2)p_1;2uvp_1 }. So { a d + b c ; a c + b d ; a d b c ; a c b d ad+bc;ac+bd;|ad-bc|;ac-bd } = { ( x 2 y 2 ) p 2 ; 2 x y p 2 ; 2 u v p 1 ; ( u 2 v 2 ) p 1 ( x^2-y^2)p_2;2xyp_2;2uvp_1;(u^2-v^2)p_1 }. Similarly, we can prove that { a f + b e ; a e + b f ; a e b f ; a f b e af+be;ae+bf;ae-bf;|af-be| } = { ( x 2 y 2 ) p 2 ; 2 x y p 2 ; 2 u v p 1 ; ( u 2 v 2 ) p 1 (x^2-y^2)p_2;2xyp_2;2uvp_1;(u^2-v^2)p_1 } = { a d + b c ; a c + b d ; a d b c ; a c b d ad+bc;ac+bd;|ad-bc|;ac-bd }. Let S = S= { a d + b c ; a c + b d ; a d b c ; a c b d ad+bc;ac+bd;|ad-bc|;ac-bd } and T = T= { a f + b e ; a e + b f ; a e b f ; a f b e af+be;ae+bf;ae-bf;|af-be| }. Since S T S \equiv T , a c + b d ac+bd is the largest element in S S and a e + b f ae+bf is the largest element in T T , we must have a c + b d = a e + b f ( f d ) ac+bd=ae+bf \Rightarrow (f-d) is divisible by a a , a contradiction since 0 < f d < a 0<f-d<a . So k 3 k \geq 3 , the smallest number M M therefore would be 5.13.17 = 1105 = 3 3 2 + 4 2 = 3 2 2 + 9 2 = 1 2 2 + 3 1 2 = 2 3 2 + 2 4 2 5.13.17=1105=33^2+4^2=32^2+9^2=12^2+31^2=23^2+24^2

Woah, this was long. I read it through thoroughly; I'll seriously have to work on my advanced number theory. I wonder if there is a more elegant solution though.

Tanishq Aggarwal - 7 years, 10 months ago

This is very nice indeed. A more standard way is to use the unique prime decomposition and other properties of the Gaussian integers. You can find out more by reading Gaussian Integers and Advanced Gaussian Integers .

Alexander Borisov - 7 years, 10 months ago

I used Euler's modification for the Brahmagupta-Fibonacci identity on 4 squares. It pretty much states that

( a 2 + b 2 + c 2 + d 2 ) ( e 2 + f 2 + g 2 + h 2 ) (a^2+b^2+c^2+d^2)(e^2+f^2+g^2+h^2)

will be able to be expressed as the sum of 2 squares 4 ways. But unfortunately for me I was trying to make each of the variables distinct positive integers, and thus as to minimize the expression, used different arrangements of 1 2 , 2 2 , 3 2 1^2, 2^2, 3^2 , etc. And then I had to cycle through 16 different permutations which would produce odd numbers and then checked the factorization of each of those with WolframAlpha. I was relieved to reach an answer of 9443 = ( 1 + 9 + 25 + 36 ) ( 4 + 16 + 49 + 64 ) = 7 × 19 × 71 9443=(1+9+25+36)(4+16+49+64)=7 \times 19 \times 71 . Pretty frustrating to realize that everything that you've been doing for 30 minutes has been for nothing. :P

Finn Hulse - 6 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...