Count the Ways

What is the smallest positive integer N N that can be written as a sum N = x 2 + y 2 N=x^2+y^2 in exactly 11 ways, where x x and y y are integers with x y > 0 ? x \geq y >0?


The answer is 5281250.

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.

4 solutions

Otto Bretscher
Nov 8, 2018

The theory of expressing integers as sums of squares is old and well understood. Let me remind the reader of the basic ideas and then apply them to our specific case. My source is Beiler's excellent "Recreations in the Theory of Numbers." Does anybody have a good link?

A good tool in this matter (although not the most sophisticated one) are the Gaussian integers Z [ i ] \mathbb{Z}[i] . Here are some basic facts on Z [ i ] \mathbb{Z}[i] : (a) It's a unique factorization domain; (b) the units are 1 , 1 , i , i 1,-1,i,-i , and (c) the primes are the elements z = x + i y z=x+iy where x 2 + y 2 x^2+y^2 is an integer prime (such as 1 + i 1+i or 2 3 i 2-3i ) as well as the integer primes that are congruent to 3 modulo 4 (we will call those the 3-primes).

For a given positive integer n n , the representations n = x 2 + y 2 n=x^2+y^2 , where x x and y y are integers, correspond to the divisors z = x + i y z=x+iy of the Gaussian integer n n with x 2 + y 2 = n x^2+y^2=n . It is sensible to restrict ourselves to the case x > 0 , y 0 x>0,y\geq 0 , thus picking exactly one representative in each class of associate divisors. Let's denote the number of such representations by g ( n ) g(n) . For example, g ( 3 ) = 0 , g ( 4 ) = 1 , g ( 5 ) = 2 g(3)=0, g(4)=1,g(5)=2 , g ( 25 ) = g ( 50 ) = 3 g(25)=g(50)=3 , and g ( 65 ) = 4 g(65)=4 .

Let's write

n = 2 a 3 a 1 7 a 2 . . . 5 b 1 1 3 b 2 . . . , n=2^{a}3^{a_1}7^{a_2}...5^{b_1}13^{b_2}...,

grouping together first the 3-primes with exponents a k a_k and then the 1-primes with exponents b k b_k . We know that g ( n ) > 0 g(n)>0 if and only if all the a k a_k are even; from now on, let us assume that this is the case. It is not hard to see that g ( n ) = ( b 1 + 1 ) ( b 2 + 1 ) . . . g(n)=(b_1 +1)(b_2 +1)... .

In this problem, we are counting the representations n = x 2 + y 2 n=x^2+y^2 somewhat differently, though, requiring that x y > 0 x\geq y>0 ; let's denote the number of such representations by f ( n ) f(n) . If g ( n ) g(n) is even, then f ( n ) = g ( n ) 2 f(n)=\frac{g(n)}{2} since we want x y x \geq y . But we have to think carefully about the case when g ( n ) g(n) is odd, meaning that all the b k b_k are even. If n n is a perfect square, meaning that a a is even as well, then we have the representation n = m 2 + 0 n=m^2+0 that contributes to g ( n ) g(n) but not to f ( n ) f(n) . If n 2 \frac{n}{2} is a perfect square, meaning that a a is odd, then we have the representation n = m 2 + m 2 n=m^2+m^2 that contributes to g ( n ) g(n) as well as f ( n ) f(n) . Thus we have

f ( n ) = 1 2 ( ( 1 ) a + ( b 1 + 1 ) ( b 2 + 1 ) . . . ) f(n)=\frac{1}{2}\Big(-(-1)^a+(b_1 +1)(b_2+1)...\Big) if all the b k b_k are even, and

f ( n ) = 1 2 ( ( b 1 + 1 ) ( b 2 + 1 ) . . . ) f(n)=\frac{1}{2}\Big((b_1 +1)(b_2+1)...\Big) otherwise

For example, f ( 25 ) = 1 f(25)=1 for 25 = 16 + 9 25=16+9 and f ( 50 ) = 2 f(50)=2 for 50 = 49 + 1 = 25 + 25 50=49+1=25+25 .

Now, finally, we can get to the specifics of our problem: we need to find the smallest n n with f ( n ) = 11 f(n)=11 . In our solution, all the a k a_k will be 0, a a will be 0 or 1, and the b k b_k will be nonascending; if any of these requirements is not met, we can easily construct a smaller solution of the equation f ( n ) = 11 f(n)=11 . Considering the three cases of our formula for f ( n ) f(n) , this means that g ( n ) = ( b 1 + 1 ) ( b 2 + 1 ) . . . g(n)=(b_1+1)(b_2+1)... must be 21, 22, or 23. In the case of g ( n ) = 21 g(n)=21 , with the factorizations 21 = 21 = 7 × 3 21=21=7\times 3 , we must have a = 1 a=1 and b 1 = 20 b_1=20 or b 1 = 6 b_1=6 . With 5 20 > > 5 6 × 1 3 2 5^{20}>>5^6\times 13^2 , the smallest solution in this case is 2 × 5 6 × 1 3 2 = 5281250 2\times 5^6\times 13^2 = 5281250 . In the two other cases, 22 and 23, all the solutions will contain a factor of 5 10 = 9765625 5^{10}=9765625 , producing larger numbers. Thus the solution is N = 5281250 N=\boxed{5281250} .

well, it was something fun, after a long time.

A Former Brilliant Member - 2 years, 7 months ago

Well, sir.....here is the link.....
http://b-ok.cc/dl/2063010/603c4a

Aaghaz Mahajan - 2 years, 7 months ago

Log in to reply

Thank you! The relevant passage starts on Page 109. (I have a hard copy, on my "top shelf.")

Otto Bretscher - 2 years, 7 months ago

Log in to reply

You're welcome Sir......!! And yes, I saw the Page......But I think, I would just start this book from scratch......that way, it would be much better........!!!
This also reminds me, Sir, have you read any books by Martin Gardner??? Those are also amazing......!! For instance, Mathematical Magic shows........

Aaghaz Mahajan - 2 years, 7 months ago

Log in to reply

@Aaghaz Mahajan Oh yes, I love Gardner. When I was in 8th grade, I won a book from Gardner (in German translation) as a prize in a maths competition at school; that's when I really fell in love with maths.

Much later, when I was at Harvard, one of my senior colleagues, Persi Diaconis, told me that "Gardner really isn't a mathematician" ("he could not integrate cos 3 ( t ) \cos^3(t) "), but he had a wonderful way to bring mathematics alive.

Otto Bretscher - 2 years, 7 months ago

@Otto Bretscher ,sir, I really like this book. Do you mind telling some other books for beginners?

Mr. India - 2 years, 2 months ago

What surprised we here was the patterns I found in pythagorean triplets. It's fairly well known that for all integer pairs (a,b), the triple (a^2-b^2, 2ab, a^2+b^2) are integer sides of a right-angle triangle. The familiar ones with a,b set to 2,1 or 3,2 give (3,4,5) and (5,12,13).

Not surprisingly, 25 and 169 can also be expressed as the sum of squares so are part of another triple : just set a,b to 3,4 or 5,12.

What did surprise me was that 65 managed to appear in two new pythagorean triples other than simple multiples of the 3,4,5 and 5,12,13. And this is not unique to 5 and 13 but to any multiple of non-identical pythagorean hypotenuse.

Malcolm Rich - 2 years, 6 months ago

Log in to reply

This theory is well understood: An odd positive integer is the hypotenuse of a primitive Pythagorean triple if and only if all its prime factors leave a remainder of 1 when divided by 4.

Otto Bretscher - 2 years, 6 months ago

Log in to reply

What about 9?

As an aside, 1105 turns up in 13 pythagorean triples.

Out of interest, how does g(4)=1 when it isn't the sum of positive squares as the question was posed.

Malcolm Rich - 2 years, 6 months ago

Log in to reply

@Malcolm Rich What's wrong with 9?

As for g ( 4 ) = 1 g(4)=1 , note that I define two different functions f ( n ) f(n) and g ( n ) g(n) (I know, it's complicated!), and for g ( n ) g(n) the representation 4 = 2 2 + 0 2 4=2^2+0^2 is allowed.

Otto Bretscher - 2 years, 6 months ago

Log in to reply

@Otto Bretscher I get it. f(n)=11 is the function you're solving, not g(n).

9 = 1 (mod 4) but isn't the hypotenuse of a pythagorean triple.

Malcolm Rich - 2 years, 6 months ago

Log in to reply

@Malcolm Rich Ignore me. It's about the prime factors.

Malcolm Rich - 2 years, 6 months ago
Tolga Gürol
Nov 19, 2018

I hate not being able to write solutions by myself but presenting video links. Nevertheless, once you watch this 30 minutes video by 3B1B the solution will pop on your mind.

I liked that video

David Gyulamiryan - 2 years, 6 months ago
Giorgos K.
Nov 18, 2018

https://oeis.org/A016032

M a t h e m a t i c a Mathematica code

n = 1; While[Length@PowersRepresentations[n++, 2, 2] != 11]; n - 1

160225 is the answer I kept coming up with, and that's the 11th number in sequence A016032. Can someone explain why that isn't the correct answer?

Brandon Parker - 2 years, 6 months ago

Log in to reply

are you counting 1-indexed or 0-indexed?
just count from 1 to 11

Giorgos K. - 2 years, 6 months ago

The number 160225 has 12 possible sums of squares: 15 400 32 399 76 393 81 392 113 384 140 375 175 360 183 356 216 337 228 329 252 311 265 300

The problem asks for exactly 11 sums.

JUAN MANUEL CRUZ MORALES - 2 years, 6 months ago

Log in to reply

I apologize for the confused expression of the pairs of sums.

Better like this: 15 400, 32 399, 76 393, 81 392, 113 384, 140 375, 175 360, 183 356, 216 337, 228 329, 252 311, 265 300

JUAN MANUEL CRUZ MORALES - 2 years, 6 months ago

160225 is the 12th number in OEIS A016032, and it has 12 solutions, given below. The question was exactly 11.

15^2+400^2=160225 32^2+399^2=160225 76^2+393^2=160225 81^2+392^2=160225 113^2+384^2=160225 140^2+375^2=160225 175^2+360^2=160225 183^2+356^2=160225 216^2+337^2=160225 228^2+329^2=160225 252^2+311^2=160225 265^2+300^2=160225

K T - 1 year, 9 months ago
Vinod Kumar
Nov 21, 2018

Read the following three references

(1) L.E. Dickson, History of the Theory of Numbers, Vol. II, "Diophantine Analysis", Ch. VI, "Sum of two squares", p. 227.

(2) WolframAlpha, Sum of Squares function.

(3)https://www.primepuzzles.net/puzzles/puzz_062.htm

Using WolframAlpha script:

"PowersRepresentations[(13^2)(5^6),2,2]" gave 11 ways but with X>Y and Y= 0 entry as follows:

{{0, 1625}, {57, 1624}, {180, 1615}, {400, 1575}, {455, 1560}, {572, 1521}, {625, 1500}, {825, 1400}, {975, 1300}, {1020, 1265}, {1113, 1184}}

Modifying and multiplying by 2

"PowersRepresentations[2(13^2)(5^6),2,2]" removed 0, but with one X= Y and gave 11 ways as follows:

{{71, 2297}, {245, 2285}, {325, 2275}, {575, 2225}, {875, 2125}, {949, 2093}, {1105, 2015}, {1175, 1975}, {1435, 1795}, {1567, 1681}, {1625, 1625}}

Answer=2 (13^2) (5^6)=5281250

Next larger number, 13*(5^10) with, all X>Y in 11 ways is given by:

PowersRepresentations[13(5^10),2,2]

{{230, 11265}, {625, 11250}, {2550, 10975}, {3375, 10750}, {3750, 10625}, {4545, 10310}, {5521, 9822}, {6250, 9375}, {6575, 9150}, {6943, 8874}, {7250, 8625}}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...