A fun surprise with Euler’s identity coming from Manjul Bhargava’s generalized factorials

Earlier this week I wrote about a really neat paper by one of the 2014 Fields Medalists Manjul Bhargava. My original post is here:

Fibonacci Factorials

and Bhargava’s fascinating paper is here:

The Factorial Function and Generlizations

I was thinking about the paper today because one of the questions Bhargava poses in the paper was stuck in my mind.  Near the end Bhargava asks about the analogue of the exponential function:

e^x = \sum_{k = 0}^{\infty} \frac{x^k}{k!}

for the generalized factorial function.  It certainly seems that for the generalized factorials, we’ll see many different values for “e”.

I also thought that it might be fun to look at the Taylor expansions for cos(x) and sin(x) and see if there was any analogue to the formula e^{\pi i} = -1 for the generalized factorials.  I got a fun little surprise when I got home and played around a little.

My idea during the day was to pretend that first positive root of sin(x) was the analog to \pi for generalized factorials and that evaluating the exponential function above at x = 1 was the analog for e.     When I tried to estimate these values for the Fibonacci Factorials that I’d found previously, I didn’t notice anything interesting.  I then moved on to looking at the example that Bhargava gives in the paper – generalized factorials over the prime numbers.    For the generalized factorial function over the primes we get the following values for the first 10 factorials:

0! = 1
1! = 1

2! = 2

3! = 24

4! = 48

5! = 5760

6! = 11,520

7! = 2,903,040

8! = 5,806,080

9! = 1,393,459,200

10! = 2,786,918,400

I calculated up to 19! in order to use 10 terms each in the series for Sin(x) and Cos(x).    Here’s what the graphs for Sin(x) and Cos(x) looked like for x between 0 and 6 when we use the first 10 terms of the Taylor series for both functions:

y = Sin(x) = x - x^3 / 3! + x^5 / 5! - x^7 / 7! . . .


and here’s what y = Cos(x) = 1 - x^2 / 2! + x^4 / 4! - x^6 / 6! + . . . looked like over the same interval:


As you can see from the two graphs, the usual identity Sin(x)^2 + Cos(x)^2 = 1 does not hold in this setting!

You can also see from the graph that the first positive root of Sin(x) is a little bit larger than 5.  According to Mathematica, the root is approximately x = 5.1819247.    So in this setting the analogy we have is that \pi \approx 5.18. . .

Now for the surprise.  Cos(x) evaluated at that root is equal to 1 to quite a high precision.  A high enough precision, in fact, that Mathematica simply returns the value 1.  I have not done enough work even to know how to calculate the remaining (infinitely many, ha!) factorials and see if that result holds in general.  Actually, I doubt that calculation is even within the realm of something that I could do.  However, if the result does hold in the general case rather than just when we approximate the various Taylor series with 10 terms, it would mean that when you evaluate Bhargava’s generalized factorials over the primes, and use the analogies for e and \pi that I mention above, you get the amazing and quite surprising identity that e^{\pi i} = 1

I need to think about this a bit more carefully now 🙂

[ post publication edit – I think I can prove it!! but it’ll have to wait until after work tomorrow]

[ Further – the proof uses Dirchlet’s Theorem on primes and arithmetic progressions. I will try to write up the proof more carefully when I have a little more time, but the idea is that for a given prime p, Dirchlet’s theorem tells us that there are infinitely many primes with remainder 1,2,3, . . . , and p – 1 when divided by p. This means that Bhargava’s factorials over the primes will add new powers of p in steps of p – 1 after the p^{th} step. But for odd primes, since p – 1 is even it will be only in the odd numbered factorials where the powers of odd primes increase. Furthermore , the even steps will increase the previous odd step by multiplying by 2. You can see the beginning of these patterns in the list above.

What this all means is that Bhargava’s prime factorials have some interesting relations. One in particular is that 2* (2n – 1)! = (2n)!. When you look at the power series for e^x, Cos(x), and Sin(x) you can see that this simple relation implies that Cos(x) = 1 - (x / 2) * Sin(x).  Thus, when Sin(x) = 0, Cos(x) = 1. Since my analogy for \pi in this setting was the first positive root of Sin(x), this all shows that for factorials over the primes it seems that the the analogy for Euler’s formula is:  e^{\pi i} = 1. Fun!

Fibonacci Numbers and basic modular arithmetic for kids

Last fun little Family Math of the summer and I thought it would be fun to play around with the Fibonacci numbers since they were already on my mind from this weekend:

Fibonacci Factorials

We started with a quick review of the Fibonacci numbers and then I explained that today’s project was going to be looking at the remainders when you divided the Fibonacci numbers by different integers.  I picked 2, 3, 5, and 11 because the first three have patterns that aren’t too hard to understand and 11 has a bit of a surprising pattern.

Having decided to make a chart for all of our remainders, we started looking at the remainders when you divide by 2. They found a pattern relatively quickly and thought that pattern would continue forever. We also talked about what fraction of Fibonacci numbers are even? This question caused a little bit of difficulty, but we got it straightened out eventually.

Next we moved on to looking at the remainders when you divide by 3. As with the remainders when you divide by 2, the pattern in the remainders here isn’t too hard to see. We also talked through the proportion of Fibonacci numbers that are divisible by 3. This proportion idea still gave them a little bit of trouble, but I thought they were starting to understand it a little better by the end of this part. They had a little trouble explaining why the pattern they saw would continue, though.

Next we moved on to looking at the remainders when you divide by 5. This one is slightly more difficult because the pattern takes a little longer to repeat and, in particular, longer than the number of rows that we have in our table. I was really pleased by the curiosity that they showed in this section while trying to figure out what the pattern was going to be.

Finally we look at the remainders when you divide by 11. I didn’t know until this weekend that you don’t get all possibly remainders modulo 11. I thought it would be neat to look at 11 specifically to show them this interesting difference from what we saw when we divide the Fibonacci numbers by 2,3, and 5.

This was a really fun project, and something that I think many kids would enjoy. It was especially fun to see them realize that they’ve seen modulo arithmetic with clocks already in the last video. Number theory has so many easy to understand projects, and I’m hoping to do a few more number theory projects with them in the upcoming school year.

Fibonacci Factorials

As part of the publicity around the Fields Medal announcement, the American Mathematical Monthly’s Facebook page pointed out this paper written by Manjul Bhargava in 2000:

The Factorial Function and Generalizations

The reason that this paper caught my attention is that I actually felt like I had a prayer of understanding the ideas that the paper was explaining.  I’m sure, of course, that the work of all of the 2014 Fields Medal winners is off the charts brilliant, but when I searched for lectures or papers by them everything but this paper was miles over my head.  So many miles, actually, that the factorial function might come in handy if I needed to describe that distance accurately!

One particularly helpful example that Bhargava gives in the paper is on top of the 6th page (page number 788) where he calculates the first six values of the generalized factorial function over the primes.  Since he said that it was “an easy matter to compute” these six values, I thought that replicating this calculation would be a fun way to see if I had understood some bits of the paper.    After a few times through the paper I finally had understood the ideas well enough to replicate the calculation, so yay!  I was also surprised to see that those six numbers (1,1,2,24,48, and 5760)  appear in the On-line Encyclopedia of Integer Sequences only once (and without reference to Bhargava’s result):

Is this the full generalized factorial function over the primes?

I don’t know if the full sequences would match each other (or, obviously, why that sequence would arise from the Taylor series of log(1 + x)^2 / \sqrt{1 + x}) but at least my calculation of the next term in Bhargava’s sequence does match the next term in the OEIS example.

So, having (hopefully) understood how to calculate this generalized factorial function over the primes, I wanted to try it for another sequence of integers.  The Fibonacci numbers seemed like as good a place as any to start, so I gave that a shot this weekend.  Unluckily I was traveling this weekend, but still found a little time early this morning at the Lone Wolf diner in Amherst, MA to get things going while enjoying their Santa Fe omelette.    According to my calculations, Bhargava’s factorial function over the Fibonacci numbers would evaluate as follows:

0! = 1

1! = 1

2! = 2

3! = 6

4! = 24

5! = 240

6! = 720

7! = 443,520  (2^7 * 3^2 *5 * 7 * 11)

8! = 443,520 (yes, the same as 7!.  That’s a surprise, but I haven’t been able to see the mistake)

9! = 2^8 * 3^4 * 5 * 7 * 11* 13 = 103,783,680

10! = 2^9 * 3^4 * 5^2 * 7 * 11* 13 = 1,037,836,800


[edit note:  after publishing earlier today, I noticed that I left of the 13 on both 9! and 10! ]

Fingers crossed that these are the correct calculations but since I slept at a farm last and was woken up early by roosters, it wouldn’t be super surprising if there was an error 🙂  In any case, one interesting thing that I learned playing around with this is that the Fibonacci numbers have an interesting pattern modulo 11.   I’m hoping to play around with this and other sequences in the next month.  I think there is a really fun project for kids hiding in here somewhere, too.

Wrapping up a week of symmetry for kids by looking at an Icosahedron

I’m leaving for a Brute Squad practice weekend in Amherst, MA in about 30 min, so I’ll have to write this one up much faster than I’d like to, but . . .

Our little math project this week was looking at symmetries of the various platonic solids.  We had a lot of help from our Zometool set, too, and that made the project extra fun for the kids.  A write up  of the first part is here:

Studying Symmetry with Rubiks cubes and Zometool

Today we finished up the project looking at an icosahedron.  To start, though, I wanted to go through a quick review of some different ways to count the faces, edges, and vertices of the various shapes.   At the end I mention Euler’s formula:

Next we moved to the kitchen to talk about the symmetries of the icosahedron. After talking about symmetries for the 4 other platonic solids earlier in the week, my hope was that we’d be able to get through this exercise without too much difficulty. One thing that I learned during the week was that it was easier for them to see the symmetries if I held the shape while they rotated it.  The combination of holding, rotating, and trying to see the symmetries was just a little too much overload.

The conversation at the end of the last video about how the symmetries of the dodecahedron and icosahedron relate to each other was unplanned. Both kids seemed pretty interested in investigating the relationship, though, so we kept going. It seemed best to start by reminding them about the connection between the symmetries of the cube and the octahedron. Once they saw that connection again, seeing the connection between the icosahedron and dodecahedron was a little easier than I was expecting.

Studying all of these symmetries made for a really enjoyable week, and this very last video was a great (and unexpectedly fun) way to wrap it all up. Can’t say enough good things about the Zometool sets and how they can help kids see fun math!

Studying symmetry with Rubik’s cubes and Zometool

Over the last week we’ve been looking informally at symmetry. The topic came up because we were studying counting with symmetry in Art of Problem Solving’s “Introduction to Counting and Probability” book. Questions such as “how many different ways can 5 people sit around a table, if ways that differ only by rotation are considered the same?” let do some nice discussions, but the slightly different question: “how many different ways can 4 keys be put on a key chain, if ways that differ only by rotation and flips are considered the same?” was a little more challenging to talk about. Wanting to talk about that second question in a little more depth led to the fun diversion into symmetry that we’ve been doing this week.

We started with symmetries of simple polygons and moved on to the symmetries of a cube yesterday. That jump was much more difficult than I expected. We talked a little bit about cubes in the morning, they boys thought more about it during the day, and we had this nice conversation last night when I got home from work:

Today I wanted to move on to symmetries of an octohedron and got a nice surprise when they boys remembered looking at octohedron’s with our Zometool set earlier this summer.

As background, we go on a little vacation with college friends every year. This year the weather forecast for the first couple of days was lots and lots of rain (I think it was the remnants of a tropical storm), so I brought our Zometool set along hoping that it would be a fun way to pass the time with all of the kids. We also brought along this book that Patrick Honner had recommended on Twitter:

Book Pic

We did a few projects from the book as well as some other projects that probably would be best described as having the kids just play around. One of the neat projects that came from the kids playing around was this one from a 12 year old girl who assured me that she “hates math.”  It was really fun to talk to her about how her creation showed that you can fit 6 pyramids inside of a cube:


One of the projects from the book that we did involved building some Platonic solids.  I have to confess that I didn’t remember this project until the kids reminded me today if you want to build an octohedron, you start by making a “starburst.”  Bet you didn’t know that!

I’m glad that that the activity from the Zome Geometry book had stuck with them.  It was a much better starting point to talking about symmetries of an octohedron than what I had planned.   The “starburst” idea really helped them understand why those symmetries are the same as a cube:

I’m happy to see one more example of how the Zometool set helps kids understand shapes and geometry.  Happier still to see that they are also a great tool to help kids understand symmetries.  The list of useful recommendations from Patrick Honner is getting to be quite large!

One thing I’m trying to do better this year

I’ve never taught young kids before so learning how to communicate math ideas to the boys has been a challenge.  A fun challenge, to be sure, and something I’m constantly trying to do better.   One benefit of filming a little bit of work with them every day is that it helps me see where I might be able to improve.

I still feel that I get surprised way more than I did when I was teaching older students, though.  That surprise might be something I thought would be difficult seems to come easy because of a connection I didn’t realize they’d make, and other times it is the opposite – something that I thought would be easy is pretty difficult.  I’m particularly trying to improve my reaction to that second type of surprise this year.   Two problems from earlier this week have had me thinking about ways to get better.

The first was with my younger son.  The problem he was working on is from an old MOEMs test:  How many multiples of 7 are there between 100 and 1000?    The part of the problem he was struggling with was finding multiples of 7 near 1000.  I didn’t anticipate difficulty with this part of the problem ahead of time, and since finding multiples of 7 near 100 didn’t seem to give him trouble while he was solving the problem, I was surprised in real time, too.

To see if any of concepts that we talked about at the time sunk in I had him redo the problem on his own this morning.  It appears that what stuck with him was the answer rather than the method.  Makes me realize that I need to emphasize more of the process than the end result in these situations:

With my older son the problem was a geometry problem from an old AMC 8. Problem #22 from the 1987 AMC 8 to be specific:

1987 AMC 8 problem 22

By coincidence we’d been talking a little bit about this type of geometry problem after looking at this Dan Meyer piece:  Developing the Question  (see here for the work we did:  Reacting to Developing the Question ).   That little bit of extra exposure to this type of problem helped him work through to the answer of 25 \pi / 4 - 12 but the answer choices were ranges rather than an exact answer.   Finding a good approximation for 25 \pi / 4 - 12 gave him a little bit of difficulty.

As I did with my younger son, I asked my older son to walk through this problem again this morning.  The results were similar – he remembers exactly how to get around the prior difficulty rather than the ideas that help. Once again, it seems that I’ve not done the best job communicating the idea.

I really hope that I’ll be able to do a better job of emphasizing ideas over answers this year – especially when I’m trying to help them through a difficult part of a problem. Although I’m not 100% sure what the best approach to improving in this area is, getting better at communicating ideas is a one place where I’m looking to improve.

4 dimensional shadows

Last night at dinner my kids were having a very interesting conversation about shadows of 4 dimensional objects.   The main question they had was whether or not a 3 dimensional shadow of a 4 dimensional object would itself cast a two dimensional shadow? Hmmm . . .  an interesting question for sure, and one that we talked about for today’s Family Math.

First, introducing the question and getting the opinion of each of the kids.  As luck would have it, they have different opinions on the matter:

Next we talked a little bit about what causes a shadow. Here we began by talking about a three dimensional object casting a two dimensional shadow on a plane. We also wondered about how a two dimensional object would see that shadow. Certainly no attempt at any math or physics rigor here, just talking and wondering about shadows.

Before moving on to the 4 dimensional case, I thought it would make sense to talk through one more point about how a 2 dimensional creature living in a 2 dimensional world would see that world. We also tried to extend this two dimensional idea to three dimensions – namely how do we see things? Finally, would would all of this mean for a 4 dimensional creature looking at a 3 dimensional world?

Next we talked about what might happen with a 4 dimensional world when a 3d shadow was cast on a 3 dimensional world? Who knows really, but this was one way to tell the story:

Finally, we finished up with a different way to think about dimension. Rather than shadows which, I think anyway, is a little tricky to talk about, here we talked about what a 4 dimensional object passing through a 3 dimensional world would look like. The easy case to start with was a 3 dimensional object passing through a 2 dimensional world. Maybe the next step is to have the boys read Flatland!

I have no idea how where the original conversation between the boys last night came from. It was fun to hear them talking by themselves about 4 dimensions, though. Hopefully the ideas we talked about today will help them understand 4 dimensions a little bit better.