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$

[ 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:

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.

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.

3D printing and negative space

As a follow up to yesterday’s blog post – Reacting to Dan Meyer’s “Developing the Question” post – I wanted to show the boys how the ideas we talked about can be used in 3D printing.  I planned to do a little more than we actually did, but our printer got up on the wrong side of bed and needed little tune up.  Despite learning more than I ever wanted to about printer maintenance, we did manage to get  in a pretty fun project.

Before we got started talking about math, I reminded them of our old “Prince Rupert Cube” project.   The question asked in this problem is whether you can pass a cube through another cube of equal size.  The math I used to create this shape (linear transformations)  is a little beyond what I wanted to show the boys today, but it still was a nice way to introduce the idea of intersecting shapes.

The slightly easier geometric shape I chose to look at in detail was the intersection of a sphere and some cylinders.  I began that conversation by talking about how you could get a computer to draw a circle and a cylinder:

Next, we went to the computer to see how to put the ideas from our talk to work. There’s a lot of just playing around with some of the commands to see what we get in this piece:

Having figured out a little bit about cylinders, we went back to the white board to talk about spheres. As usual, the intention wasn’t to be rigorous at all here, rather just to talk about the differences between cylinders and spheres. It was fun to hear the boys talk in a little bit of a hand waving way about what they thought the equation of a sphere would be.

For the last part of the talk we went back to the computer to draw some spheres and cylinders. Eventually we make a neat shape out of a sphere of radius 2 intersecting 3 mutually perpendicular cylinders of radius 1.

It was kind of fun to see the boys recognize that our final shape was pretty similar to Laura Taalman’s Coin Traps.  You should, of course check out her entire blog, too:  Makerhome Blog.

After we finished the last movie we made a slightly higher resolution version of our shape (150 plot points) and exported it to the Maker Bot.  Of course, we had to make it the right size to trap some coins!  Definitely a fun morning turning some of the math that we talked about yesterday into something that you can hold in your hand..

Reacting to Dan Meyer’s “Developing the Question” post

Yesterday (August 14, 2014) I saw this post from Dan Meyer, which is part of what I’m sure will be an interesting series:
Developing The Question: Good Work!

Something made this post stick in my mind for the rest of the day, though even now I have not been able to put my finger on precisely what it was.  After the kids went to bed last night I decided to use one of the problems in the post as a starting point for a little math project this morning.  My hope was that the combination of thinking through and then going through a little talk would help focus my thoughts on the original post.  It failed in that regard, but talking through some of the ideas that were motivated by Meyer’s post was pretty fun nonetheless.

We started with a slightly modified version of one of the problems from the MathArguments180 blog:

I made the problem with four circles and a square rather than three circles and a triangle so that my younger son wouldn’t have to worry about finding the area of a triangle.  Stepping through the three questions got the project off to a great start:

One of the things about this problem (and all three problems referenced in Meyer’s post) that I thought was interesting was the wide variety of possible extensions. One of my favorites goes back to multiplication. Chopping up a rectangle into smaller rectangles is an neat way to show a geometric interpretation of multiplication. Perhaps a little more surprising is that you can use the exact same idea to show why a negative number multiplied by a negative number is a positive number:

The idea from the negative times a negative piece of the last video has some other fun geometric extensions. By coincidence, yesterday my younger son and I were talking through a neat problem about a cube with some holes in it. He actually built a model of the object out of snap cubes to help him understand the problem and we used that model today. Yesterday’s question was about the number of 1×1 square pieces on the surface, so to mix it up a little today I asked about the number of cubes in the model. My goal here was to show how the “taking away more than you had” idea from the last video gives us a new way to study this cube:

For the last bit of the talk we went back to the whiteboard. I wanted to show an example from geometry that would look similar to the first problem, but might give the boys a chance to understand the “take away more than you have” example in a slightly different setting. They saw the problem in a little bit different way, though. That’s fine, obviously, so I ended up just showing them the “take away more than you have” approach at the end and showing that both approaches lead you to the same answer.

One last bit that I wanted to talk through that I didn’t have time to get to was something from an old 3D printing project we did. At the end of this post – Learning from 3D Printing – are some pictures showing a solution to the “Prince Rupert Problem.”  Learning how to create the red shape in Mathematica was a really fun project whose main idea involved breaking up a space into pieces you already could understand.    Fortunately Mathematica has built in capability to add and subtract shapes in 3 dimensions.

Anyway, I did really enjoy the 3 questions idea from Matharguments180 blog.  It was also fun to talk through some of the various fun and surprising extensions of the ideas from the first problem.  I may update this post if I am ever able to put my finger on why Dan Meyer’s post stuck in my mind, but for now the result of that stickiness will just have to be a fun little math project with the kids this morning.

ALS and the Ice Bucket Challenge

My high school math teacher, Mr. Waterman, died from ALS last year.  There’s almost no way to explain the influence that he had on me as a kid.  From math, to teaching, to simply understanding how one person can have a tremendous impact on another person’s life, I am a different and better person because of him.   Earlier today  I was tagged by another student of his for the Ice Bucket Challenge.  Here’s my video – I hope the publicity from this challenge raises buckets of money for ALS reserach:

For most of this week the Quanta Magazine piece on Maryam Mirzakhani winning the Fields Medal had me reflecting on my time in high school. Here’s the article, it is absolutely fantastic:

A Tenacious Explorer of Abstract Surfaces

“Eager to discover what they were capable of in similar competitions, Mirzakhani and Beheshti went to the principal of their school and demanded that she arrange for math problem-solving classes like the ones being taught at the comparable high school for boys. “The principal of the school was a very strong character,” Mirzakhani recalled. “If we really wanted something, she would make it happen.” The principal was undeterred by the fact that Iran’s International Mathematical Olympiad team had never fielded a girl, Mirzakhani said. “Her mindset was very positive and upbeat — that ‘you can do it, even though you’ll be the first one,’ ” Mirzakhani said. “I think that has influenced my life quite a lot.”

So, she asked the school principal to provide a problem solving class and a year or two later won a gold medal at the IMO, and followed that up the next year with a perfect score.   Good gracious.  Even several days later I’m not sure I can wrap my head around that.   That has to be one of the most amazing accomplishments (in any field) that I’ve ever heard of in my life.

That insane accomplishment aside, it also shows the influence that principal and the teachers had.  I was pretty lucky, too, to have a great principal,  Dr. Moller,  along with Mr. Waterman.  Dr. Moller had a effectively infinite trust in Mr. Waterman had gave him enormous room to teach how he wanted.  We didn’t have to beg for a problem solving class, for example, because it already existed!   Linear Algebra and Differential Equations, too.  Really amazing and probably not what you’d expect from a high school in Omaha.  Truthfully, though, it was only many years later that I realized Dr. Moller’s role, but the older I get  the more I realize how important it was.  The article about Mirzakhani probably made me understand the luck I had in this area a little better.

There was a nice article about Mr. Waterman in the Omaha World Herald after he died:

John Carl Waterman inspired as Omaha teacher and coach

And a nice letter to the editor from Dr. Moller, as well:

Waterman was excellent instructor

I was John Waterman’s principal during his career at Omaha Central High School (“Waterman inspired as teacher and coach,” Sept. 29 World-Herald).

He had a rare talent for making weak math students believe in themselves and succeed in learning math, often for the first time, and he inspired strong math students to achieve even more than they ever expected. His math teams’ records still are among the best in Nebraska high school competition. He was among the first in the state to recognize computer capabilities for teaching math, and he implemented computer programs and activities that were cutting edge for the time.

John has former students working all over the world who would testify that he was an exemplary teacher taken from us much too early.

G.E. Moller, Omaha

You never know how someone is going to influence your life, but I certainly was the beneficiary of some good luck in high school.  I sure hope the Ice Bucket promotion raises lots of money for ALS research.