A neat property of reciprocals of primes

I’d pulled out Ingenuity in Mathematics by Ross Honsberger yesterday in a twitter thread about old but fun math books. It was still on my dining room table this morning when I was looking for a project.

Chapter 16 showed a neat idea that I’d never seen before – if the decimal expansion of the reciprocal of a prime number has a repeating pattern with an even number of digits, then the first half of the digits plus the last half will add up to a number with all 9’s.

An example with 1/7 shows the property:

1/7 = 0.142857142857142857…., and

142 + 857 = 999.

The proof of this fun fact was a little more than I wanted to get into today, so instead I talked about reciprocals, then showed the property, and finally talked about Fermat’s Little Theorem which is one of the key elements in the proof of this property of prime reciprocals.

Here’s how we got going – just an introductory talk about repeating decimals:

Next up was the repeating decimal property of some prime numbers. It was neat to hear what the boys thought about this property:

Finally, we talked a little modular arithmetic and about Fermat’s Little Theorem.

This was definitely a fun and light project. I think the full proof of this interesting property of prime reciprocals is accessible to kids, but would take some planning. It was too much for today, though, but I was still happy with the discussion the property inspired.

Talking primes using Dirk Brockmann’s “Prime Time” explorable

I’ve been a huge fan of Dirk Brockmann’s explorable math activities since I first learned about them. The full list is here:

Dirk Brockmann’s Explorables

Today’s project was inspired by the “Prime Time” program – direct link here:

Dirk Brockmann’s Prime Time Explorable

I started the project today by asking my son to tell me some things he knew about primes. He gave the definition of a prime numbers, explained how we know that there are infinitely many primes, and talked about twin primes, though he apologized for not knowing how to prove that there were infinitely many twin primes:

Next I showed him the polynomial n^2 + n + 41 and we talked about this equation producing a lot of primes.

Now we went to the “prime time” explorable and my son talked about what he saw in the first two examples -> the Ulam spiral and the Sack spiral.

Finally we looked at the last two patterns -> the Klauber triangle and the Witch’s spiral.

Having the boys work through some of Kate Owens’s math contest problems

Yesterday I saw a fun tweet from my friend Kate Owens who is a math professor at the College of Charleston.

These problems from yesterday’s math contest looked like they would make a fun project, so had the boys work through the first 6 this morning.

Here’s problem #1 – this problem lets kids get in some nice arithmetic practice:

Screen Shot 2019-02-24 at 7.47.04 AM

Here’s problem #2 – the challenge here is to turn a repeating decimal into a fraction:

Screen Shot 2019-02-24 at 7.47.44 AM

Here’s problem #3 – this is a “last digit” problem and provides a nice opportunity to review some introductory ideas in number theory. The boys were a bit rusty on this topic, but did manage to work through the problem to the end:

Screen Shot 2019-02-24 at 7.48.20 AM.png

Problem #4 is a neat problem about sums, so some good arithmetic practice and also a nice opportunity to remember some basic ideas about sums:

Screen Shot 2019-02-24 at 7.48.49 AM

Next up is the classic math contest problem about finding the number of zeros at the end of a large factorial. My older son knew how to solve this problem quickly, so I let my younger son puzzle through it. The ideas in this problem are really nice introductory ideas about prime numbers:

Screen Shot 2019-02-24 at 7.49.22 AM

The last problem gave the boys some trouble. BUT, by happy coincidence I’m about to start covering partial fractions with my older son, so the timing for this problem was lucky. It was interesting to see the approach they took initially. When they were stuck I had the spend some time thinking about what was making the problem difficult for them.

Screen Shot 2019-02-24 at 7.50.08 AM

A fun discussion about prime numbers with kids inspired by an Evelyn Lamb joke!

Yesterday I saw this tweet from Evelyn Lamb:

It inspired me to do a project on prime numbers with the boys. So, I grabbed my copy of Martin Weissman’s An Illustrated Theory of Numbers and looked for a few ideas:

We began by talking about why there are an infinite number of primes:

Next we moved on to taking about arithmetic sequences of prime numbers. There are a lot of neat results about these sequences, though as far as I can tell, they have proofs way beyond what kids could grasp. So instead of trying to go through proofs, we just played around and tried to find some sequences.

I also asked the boys how we could write a computer program to find more and they had some nice ideas:

Next we played with the computer programs. Sorry that this video ran a bit long. As a challenge for kids – why couldn’t we find any 4 term sequences with a difference of 16?

Finally, we looked at Evelyn Lamb’s joke to see if we could understand it!

It is definitely fun to be able to share some elementary ideas in number theory with kids!

Sharing Gary Rubinstein’s Perfect Number video with my 6th grader

Saw a neat tweet from Gary Rubinstein earlier in the week:

Our first project with his videos used his “Russian Peasant” multiplication video. That project is here:

Using Gary Rubinstein’s “Russian Peasant” video with kids

Today my older son is away at camp, so I was working with my younger son alone. I asked him to pick another one of Rubinstein’s videos and he picked the one on perfect numbers.

After watching the video I sat down with him to do a project – there was enough in Rubinstein’s video to easily fill three short videos, but we did just one. It was absolutely incredible to see how much my son took out of the perfect number video. There’s a fun and totally unexpected and unplanned connection with the Russian Peasant video at the end, too:

I love it when the projects go this well 🙂

Sharing Numberphile’s Goldbach Conjecture video with kids

Numberphile released a really nice video about the Goldbach Conjecture today:

I thought it would make an excellent project with the boys even though some of the ideas involving logarithms might be over their head. So, we watched the movie and then talked about some of the ideas that caught their eye.

Next we moved on to the individual ideas. The first one was the chart that David Eisenbud made at the beginning of the video. Drawing and then filling in this chart is a nice little arithmetic activity for a kid in elementary school.

Next we talked about logarithms. I started with an idea I learned from Jordan Ellenberg’s book “How Not to be Wrong” – the “flogarithm”. That idea is to oversimplify the logarithm by defining it to be the number of digits in the number. That simple (and genius) idea really opens the door to kids thinking about logarithms.

With that short introduction I explained what the natural logarithm was and moved on to some of the properties of primes that Eisenbud mentioned in the video (after fumbling with the calculator on my phone for a minute . . . .).

(Also, I noticed watching the video just now that I forgot to divide by 2 at one point – sorry about that.)

Finally, we checked a specific example – how many ways were there to take two primes and add up to 50? This part is about as far away from the complexity of logarithms as you can get – just some nice arithmetic practice for kids.

To warp up I asked them if they knew any other unsolved problems about primes. My older son mentioned something about twin primes. I showed the boys a simple argument (fortunately quite similar to the one Eisenbud gave in the movie for why there are lots of ways two primes can add to be a given even number) for why there ought to be infinitely many twin primes.

I think that kids are going to be naturally curious about primes. The Goldbach conjecture is one of the few unsolved problems that kids can understand. It was fun to share this video with the boys tonight.

Sharing Grant Sanderson’s “Pi and Primes” video with kids part 2:

Grant Sanderson’s latest video explaining a connection between pi and prime numbers is absolutely fantastic:

This video is sort of at the edge of what kids can understand, but it was fun to explore a few of the ideas with them even if understanding 100% of the video was probably not realistic. Our project on the first 10 min of the video is here:

Sharing Grant Sanderson’s Pi and Primes video with kids part 1

Also, we did a project on a different approach to the problem Sanderson is studying previously:

A really neat problem that Gauss Solved

I intended to divide our study of Sanderson’s video into three 10 minute sections, but the second 20 minutes was so compelling that we just watched it all the way through. After watching the last 20 min a 2nd time this morning I asked the kids what they found interesting. The three topics that they brought up were:

(i) The \chi function,

(ii) The formula for \pi / 4, and

(iii) Factoring ideas in the Gaussian integers

Following the introduction, we talked about the three topics. The first was factoring in the Gaussian integers. We talked about this topic in yesterday’s project, too.

Next we talked about the \chi function. I had no idea how the discussion here was going to go, actually, but it turned out to be fantastic. The boys thought the function looked a lot like “remainder mod 4”. Why it does look like that and why it doesn’t look like that is a really neat conversation with kids.

Finally we talked through the formula that Sanderson explained for \pi / 4. It probably goes without saying that Sanderson’s explanation is better than what we did here, but it was nice to hear what the boys remembered from seeing Sanderson’s video twice.

I love having the opportunity to share advanced math with kids. I don’t really have any background in number theory and probably wouldn’t have tackled this project with out Sanderson’s video to show me the path forward. It really is amazing what resources are on line these days!

Sharing Grant Sanderson’s “Pi and Primes” video with kids. Part 1

[This one was written up pretty quickly because we had to get out the door for some weekend activities. Sorry for publishing the un-edited version]

Grant Sanderson has a new (and, as usual, incredible) video on “Pi hiding in prime regularities”:

By coincidence, we’ve done a project on this topic before:

A really neat problem that Gauss Solved

The old project is based on Chapter 8 from this book:

Ingenuity Pic

Sanderson’s new video is pretty deep and about 30 min long, so I’m going to break our project on his video into 3 pieces. Today we watched (roughly) the first 10 min of the video. Here’s what the boys took away from those 10 min:

The first topic we tackled today was how to write integers as the sum of two squares. This topic is the starting point in Sanderson’s video and the main point of the project from the Ingenuity in Mathematics project. We explored a few simple examples and, at the end, talked about why integers of the form 4n + 3 cannot be written as the sum of two squares:

Next we turned our attention to the complex numbers and how they came into play in (the first 10 min of) Sanderson’s video. My focus was on the Gaussian Integers. In this part of the project we talked about (i) why it makes sense to think of these as integers, and (ii) how we get some new prime numbers (and also lose a few) when we expand our definition of integers to include the Gaussian Integers:

To wrap up I mentioned the topic from the prior project. The question there is something like this -> since counting the exact number of ways an integer can be written as the sum of two squares is tricky, can we say anything about how to write an integer as the some of two squares?

Turns out you can, and that the average number of different ways to write a number as the sum of two squares is \pi. Pretty incredible.

[and, of course, I confused an n and n^2 in the video 😦 Looking at the prior project will hopefully give a better explanation than I did here . . . . ]

I’m always excited to go through Grant Sanderson’s video with the boys. He has an amazing ability to take advanced ideas and make them accessible to a wide audience. Sometimes making the topic accessible to kids requires a bit more work – but Sanderson’s videos are a great starting point.

Sharing Kelsey Houston-Edwards’s Cryptography video with kids

I’m falling way behind on Kelsey Houston-Edwards’s video series, sadly. Her “How to Break Crytography” video is so freaking amazing that it needed to be first in line in my effort to catch up!

So, this morning I watched the video with the boys. We stopped the video a few times to either work through some of the math, or simply to just have me explain it a bit. Overall, though, I think this video is not just accessible to kids, but is something that they will find absolutely fascinating.

Here’s what my kids took away from it:

Next we went upstairs to write some Mathematica code to step through the process that Houston-Edwards described in her video. In this video we (slightly clumsily) step through the code and check a few small examples:

When I turned the camera off after the last video my younger son asked a really interesting question -> Why don’t we just use Mathematica’s “FactorInteger[]” function?

We talked about that for a bit in this video and then tried to use Shor’s algorithm to find the factors of a number that was the product of two 4 digit primes.

So, we had the camera off for a little over a minute after the last video, but the good news is that Mathematica did, indeed, finish the calculation. It was a nice (and somewhat accidental) example of how quickly this algorithm runs into trouble.

The cool thing, though, is that it did work 🙂

Definitely a fun project, though it does require a bit more computer power than most of our other projects. I’m happy to be catching up a little on Kelsey Houston-Edwards’s video series – it really is one of the best math-related things on the internet!

A nice problem about primes for kids from James Tanton

Saw a really cool tweet from James Tanton today:

Tonight I sat down with the boys to make sure they understood the problem. They noticed that half the numbers would have no powers of two – good start! After that observation they started down the path to solving the problem really quickly. In fact, my younger son thought that we might have a geometric series.

Since we covered a few ideas pretty quickly in the last video, so I stared this part of the project by asking them to give me a more detailed explanation for how they got the 1/2, 1/4, 1/8, . . . pattern in the last video. It turned out to be a little harder for them to give precise arguments, but they did manage to hit the main points which was nice.

At the end of this video my older son was able to write down the series that we needed to add up to solve the problem.

Now that we had the series, we had to figure out how to add it up. My guess was that they’d never seen a series like this, but my older son had a really cool idea almost immediately – rewrite the series!

The boys were able to sum the series in this new form – so yay!

At the end of of the last video my younger son said that he was surprised that the “expected value” wasn’t zero since zero was the most likely value. In this part of the video we talked a bit more about what “expected value” meant.

Once we had that I asked what I meant to be a quick question -> is the expected number of 3’s higher or lower. It turned out to be a longer conversation than I expected, though, because my older son was actually able to write down the answer!

Definitely a fun problem. I think it is fun for kids to see how to add up a series like the one in this project. I also think it is fun for kids to explore some of the basic ideas about primes that pop up in this problem.

As an aside, one other place where I’ve seen the series that came up here is in this post from Patrick Honner:

Proof Without Words: Two Dimensional Geometric Series

His “proof without words” for the sum is this picture – can you see how it works?

Mr Honner Square