Finding integers that can be written as the sum of two positive squares in exactly 7 different ways

A few days ago we did a project using Mathologer’s amazing video on Fermat’s “two squares” theorem. At the end of the project the boys were wondering about why so many of he numbers we found that could be written as the sum of two squares in several different ways were multiples of 5. I was wondering the same thing and spent two days playing around and trying to learn more these sorts of numbers. Even after searching the positive integers up to 3,000,000, all of the numbers I found that could be written as the sum of two positive squares in exactly 7 ways were multiples of 5. What was so special about 5?

Overnight I got some great twitter advice on the subject form Stephen Morris and Alex Kontorovich. Their ideas helped me understand a bit more about what was going on. Tonight I explored some of the basic ideas with the boys. I know next to nothing about the number theory here, but am completly amazed by the never ending patterns that are hiding inside of the integers!

We started today’s project by looking at all of the positive integers less than 1,000,000 that can be written as the sum of 2 positive squares in exactly 7 ways. Here’s what they noticed:

At the end of the last video my younger son thought that it might be useful to factor all of the numbers on our list. We did that off camera and then the boys looked for patterns in the numbers and factors. Finding patterns in the factored numbers was more challenging than I expected, but they were able to make some progress.

Based on what we noticed we took some guesses at numbers that were not multiples of 5 that could be written as a sum of two positive squares in exactly 7 ways.

Finally, we used the Wolfram Alpha code that Stephen Morris showed us to check if the numbers we guessed really could be written as the sum of two positive squares in exactly 7 ways.

This project was incredibly fun. It shows how computers (and Twitter!) can really help kids explore some pretty advanced ideas. I’m really interested to see how we might be able to explore a few more related ideas in the next week.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s