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.

Advertisements

More intro number theory with my son inspired by Martin Weissman’s An Illustrated Theory of Numbers

I’ve been thinking about more ways to use Martin Weissman’s An Illustrated Theory of Numbers with the boys lately:

Today I was looking for a project with my son and flipped open to the chapter on quadratic reciprocity. It had a few introductory ideas that I thought would be fun to share with my younger son.

We first looked at Wilson’s Theorem:

After Wilson’s theorem, we moved on to talking about perfect squares mod a prime. After a fairly long discussion here my son noticed that half of the non-zero number mod a prime are perfect squares:

Finally, I asked him to make a mod 11 multiplication table and we talked through some of the patterns in the table – including that the non-zero numbers had multiplicative inverses:

It was a really fun discussion today. I know next to nothing about number theory, but I really would like to use Weissman’s book more to explore some advanced ideas with the boys.

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!

Exploring Wilson’s theorem with kids inspired by Martin Weissman’s An Illustrated Theory of Numbers

I love Martin Weissman’s An Illustrated Theory of Numbers:

Flipping through it last night I ran into an easy to state theorem that seemed like something the boys would enjoy exploring:

Wilson’s Theorem -> If p is a prime number, then

(p-1)! \equiv -1 \mod p.

The proof is a bit advanced for the kids, but I thought it would still be fun to play around with the ideas. There is an absolutely delightful proof involving Fermat’s Little Theorem on the Wikipedia page about Wilson’s Theorem if you are familiar with polynomials and modular arithmetic:

The Wikipedia page for Wilson’s Theorem

Here’s how I introduced the theorem. We work through a few examples and the boys have some nice initial thoughts. One happy breakthrough that the boys made here is that they were able to see two ideas:

(i) For a prime p, (p-1)! is never a multiple of p, and

(ii) There were ways to pair the numbers in (p-1)! (at least in simple cases) to see that the product was -1 \mod p

Next we tried to extend the pairing idea the boys had found in the first part of the project. Extending that idea was initially pretty difficult for my younger son, but by the end of this video we’d found how to do it for the 7! case:

Now we moved on to study 11! and 13! At this point the boys were beginning to be able to find the pairings fairly quickly.

To wrap up this morning, I asked the boys for ideas on why we always seemed to be able to pair the numbers in a way that made Wilson’s theorem work. They had some really nice ideas:

(i) For odd primes, we always have an even number of integers – so pairing is possible,

(ii) We always have a product 1 * (p-1) which gives us a -1.

Then we chatted a bit more about why you could always find the other pairs to produce products that were 1. The main focus of our conversation here was why it wouldn’t work for non-primes:

Definitely a fun project! There’s some great arithmetic practice for the boys and also a many opportunities to explore and experience fun introductory ideas about number theory.

Introducing the basic ideas behind quadratic reciprocity to kids

We are heading out for a little vacation before school starts and I wanted a gentle topic for today’s project. When I woke up this morning the idea of introducing the boys to quadratic reciprocity jumped into my head. The Wikipedia page on the topic gave me a few ideas:

Wikipedia’s page on quadratic reciprocity

I started the project by showing them the chart on Wikipedia’s page showing the factorization of n^2 - 5 for integers 1, 2, 3, and etc . . .

What patterns, if any, would they see?

Next we moved to a second table from Wikipedia’s page – this table shows the squares mod p for primes going going from 3 to 47.

Again, what patterns, if any, do they notice?

Now I had them look for a special number -> for which primes p could we find a square congruent to -1 mod p?

Finally, we wrote short program in Mathematica to test the conjecture that we had in the last video.  The conjecture was that primes congruent to 3 mod 4 would have no squares congruent to -1 mod p, and for primes congruent to 1 mod 4 would, -1 would  always be a square.

Sorry for the less than stellar camera work in this video . . . .