The Dying Art of Mental Math Tricks

Without using a calculator, can you tell how much 752 is? If you are reading my blog, with high probability you know that it is 5625. The last two digits of the square of a number ending in 5 are always 25. So we only need to figure out the first two digits. The first two digits equals 7 times 8, or 56, which is the first digit of the original number (7) multiplied by the next number (8).

I was good at mental arithmetic and saved myself a lot of money back in the Soviet Union. Every time I shopped I calculated all the charges as I stood at the cash register. I knew exactly how much to pay, which saved me from cheating cashiers. To simplify my practice, the shelves were empty, so I was never buying too many items.

When I moved to the US, the situation changed. Salespeople are not trying to cheat, not to mention that they use automatic cash registers. In addition, the US sales taxes are confusing. I remember how I bought three identical chocolate bars and the total was not divisible by 3. So I completely dropped my at-the-cash-registers mental training.

Being able to calculate fast was somewhat useful many years ago. But now there is a calculator on every phone.

John H. Conway is a master of mental calculations. He even invented an algorithm to calculate the day of the week for any day. He taught it to me, and I too can easily calculate that July 29 of 1926 was Thursday. This is not useful any more. If I google “what day of the week is July 29, 1926,” the first line in big letters says Thursday.

One day a long time ago I was watching a TV show of a guy performing mental tricks: remembering large numbers, multiplying large numbers, and so on. At the end, to a grand fanfare, he showed his crowned trick. A member from the audience was to write down a 2-digit number, and to raise it to the fifth power using a calculator. The mental guy, once he is told what the fifth power was, struggled with great concentration and announced the original number.

I was so underwhelmed. Anyone knows that the last digit of a number and its fifth power are the same. So he only needs to guess the first digit, which can easily be estimated by the size of the fifth power.

I found the description of this trick online. They recommend memorizing the fifth powers of the numbers from 1 to 9. After that, you do the following. First, listen to the number. Next, the last digit of the number you hear is the same as the last digit of the original number. To figure out the first digit of the original number, remove the last 5 digits of the number you hear. Finally, determine between which fifth powers it fits. This makes sense. Or, you could be lazy and remember only meaningful digits. For example, 395=90,224,199, and 405=102,400,000. So if the number is below 100,000,000, then the first digit is less than 4.

You do not have to remember the complete fifth powers of every digit. You just need to remember significant ranges. Here they are:

first digit range
1 between 100,000 and 3,000,000
2 between 3,000,000 and 24,000,000
3 between 24,000,000, 100,000,000
4 between 100,000,000 and 300,000,000
5 between 300,000,000 and 750,000,000
6 between 750,000,000 and 1,600,000,000
7 between 1,600,000,000 and 3,200,000,000
8 between 3,200,000,000, and 5,900,000,000
9 above 5,900,000,000

Besides, for this trick the guy needed to guess one out of one hundred number. He had a phenomenal memory, so he could easily have remembered one hundred fifth powers. Actually he doesn’t need to remember all the numbers, only the differentiated features. On this note, there is a cool thing you can do. You can guess the number before the whole fifth power is announced. One caveat: a 1-digit number x and 10x when taken to the fifth power, both begin with the same long string of digits. So we can advise the audience not to suggest a 1-digit number or a number divisible by 10, as that is too easy (without telling the real reason).

Now we can match a start of the fifth power to its fifth root. Three first digits are almost always enough. Here is the list of starting digits and their match: (104,16), (107,64), (115,41), (116,65), (118,26), (12,66), (130,42), (135,67), (141,17), (143,27), (145,68), (147,43), (156,69), (161,11), (164,44), (17,28), (180,71), (184,45), (188,18), (19,72), (2051,29), (2059,46), (207,73), (221,74), (229,47), (23,75), (247,19), (248,12), (253,76), (254,48), (270,77), (282,49), (286,31), (288,78), (30,79), (33,32), (345,51), (348,81), (370,82), (371,13), (38,52), (391,33), (393,83), (40,21), (4181,53), (4182,84), (44,85), (454,34), (459,54), (470,86), (498,87), (50,55), (51,22), (525,35), (527,88), (53,14), (550,56), (558,89), (601,57), (604,36), (62,91), (64,23), (656,58), (659,92), (693,37), (695,93), (71,59), (73,94), (75,15), (77,95), (792,38), (796,24), (81,96), (84,61), (85,97), (902,39), (903,98), (91,62), (95,99), (97,25), (99,63).

Or, you can come to the mental guy’s performance and beat him by shouting out the correct answer before he can even finish receiving the last digit. This would be cool and cruel at the same time.

Share:Facebooktwitterredditpinterestlinkedinmail

Statistics Jokes

* * *

Do you know a statistics joke?
Probably, but it’s mean!

* * *

Twelve different world statisticians studied Russian roulette. Ten of them proved that it is perfectly safe. The other two scientists were unfortunately not able to join the final discussion.

* * *

A statistician bought a new tool that finds correlations between different fields in databases. Hoping for new discoveries he ran his new tool on his large database and found highly correlated events. These are his discoveries:

  • The most correlated fields were the title and the gender. If the title is Mr., then the gender is male.
  • The children have the same last names as parents.
  • The children are much younger than the parents.
  • The main cause of divorces is weddings.

* * *

Scientists discovered that the main cause of living ’till old age is an error on the birth certificate.

* * *

Scientists concluded that children do not really use the Internet. This is proven by the fact that the percentage of people saying ‘No’ when asked ‘Are you over 18?’ is close to zero.

* * *

— Please, close the window, it is cold outside.
— Do you think it will get warmer, after I close it?

Share:Facebooktwitterredditpinterestlinkedinmail

The Best Writing on Mathematics 2014

The Best Writing on Mathematics 2014Some of my friends collect volumes of The Best Writing on Mathematics published by Princeton University Press. The first annual volume appeared in 2010. In 2014, one of my papers, Conway’s Wizards, was chosen to be included in the volume The Best Writing on Mathematics 2014.

All my life I have hated writing. My worst grades in high school were for writing. I couldn’t write in Russian, and I was sure I would never be able to write in English. I was mistaken. I am a better writer than I gave myself credit for being.

Writing in English is easier for me than writing in Russian because when I make a mistake, I have an excuse. As my written English gets better and better, maybe one day I’ll get the courage to try writing in Russian.

I would like to use this opportunity to thank Sue Katz, my friend, English teacher, and editor. Sue edits most of my blog essays. Originally I wrote about Conway’s wizards on my blog. When I had three essays on the subject I combined them into a paper. Sue edited the essays and the paper. I am honored to be included in this respected volume and I want to share this honor with Sue.

Share:Facebooktwitterredditpinterestlinkedinmail

Kvantik’s Problems

Kvant was a very popular science magazine in Soviet Russia. It was targeted to high-school children and I was a subscriber. Recently I discovered that a new magazine appeared in Russia. It is called Kvantik, which means Little Kvant. It is a science magazine for middle-school children. The previous years’ archives are available online in Russian. I looked at 2012, the first publication year, and loved it. Here is the list of the math puzzles that caught my attention.

The first three problems are well known, but I still like them.

Problem 1. There are 6 glasses on the table in a row. The first three are empty, and the last three are filled with water. How can you make it so that the empty and full glasses alternate, if you are allowed to touch only one of the glasses? (You can’t push one glass with another.)

Problem 2. If it is raining at midnight, with what probability will there be sunshine in 144 hours?

Problem 3. How can you fill a cylindrical pan exactly half-full of water?

I like logic puzzles, and the next two seem especially cute. I like the Parrot character who repeats the previous answer: very appropriate.

Problem 4. The Jackal always lies; the Lion always tells the truth. The Parrot repeats the previous answer—unless he is the first to answer, in which case he babbles randomly. The Giraffe replies truthfully, but to the previous question directed to him—his first answer he chooses randomly.
The Wise Hedgehog in the fog stumbled upon the Jackal, the Lion, the Parrot, and the Giraffe, although the fog prevented him from seeing them clearly. He decided to figure out the order in which they were standing. After he asked everyone in order, “Are you the Jackal?” he was only able to figure out where the Giraffe was. After that he asked everyone, “Are you the Giraffe?” in the same order, and figured out where the Jackal was. But he still didn’t have the full picture. He started the next round of questions, asking everyone, “Are you the Parrot?” After the first one answered “Yes”, the Hedgehog understood the order. What is the order?

Problem 5. There are 12 cards with the statements “There is exactly one false statement to the left of me,” “There are exactly two false statements to the left of me.” …, “There are 12 false statements to the left of me.” Pete put the cards in a row from left to right in some order. What is the largest number of statements that might be true?

The next three problems are a mixture of puzzles.

Problem 6. Olga Smirnov has exactly one brother, Mikhail, and one sister, Sveta. How many children are there in the Smirnov family?

Problem 7. Every next digit of number N is strictly greater than the previous one. What is the sum of the digits of 9N?

Problem 8. Nine gnomes stood in the cells of a three-by-three square. The gnomes who were in neighboring cells greeted each other. Then they re-arranged themselves in the square, and greeted each other again. They did this one more time. Prove that there is at least one pair of gnomes who didn’t get a chance to greet each other.

Share:Facebooktwitterredditpinterestlinkedinmail

The Miracle of my CPAP Machine

As I told you before I was recently diagnosed with severe sleep apnea. My doctor ordered me to use a CPAP machine&mdasha Continuous Positive Airway Pressure machine&mdashthat blows air into my nose and improves the quality of overnight breathing.

I was elated, hoping for a miracle. I haven’t had a good night’s sleep in 20 years. I was so looking forward to waking up rested.

When I went to bed, I put on my nose mask and turned on the machine. The mask was uncomfortable. It gave me headaches and I had to sleep on my back which I do not like. It also had this annoying plastic smell. It took me some time to fall asleep, but eventually I did.

To my disappointment I didn’t wake up rested; I woke up tired as usual. Still, I decided not to give up and continued trying the machine.

Several days passed and I found myself mopping the kitchen floor. I never ever mop floors. I have my cleaning crew do that. That mopping was my first positive sign. Then my relatives started telling me that my voice had changed and had become more energetic. A week later I invited my son and his family for my weekly family dinner, which I have been canceling every previous week for several months.

A month after I began sleeping with the machine, I started having night dreams, something I forgot even existed. After two months, I would wake up and my first thought would be, “What day is it today?” Prior to using the machine, my first waking thought was, “My alarm clock must be broken. It’s impossible that I have to get up now. I feel too weak to stand up.”

My machine is very smart. It records the data from my sleep and uploads it to a website, which my doctor and I can access. Instead of the 37 apnea episodes per hour I had during my sleep study, now I have 1 episode per hour. The quality of my life has changed gradually. I am not yet ready to conquer the world, but I have so much more energy. I’ve even accepted two more job offers, and now I have six part-time jobs. (I’ll tell you all about this some other time.)

There have been some side effects. For some reason I gained 10 pounds during the first two weeks of using the machine. And I feel like an elephant. Not because of my heavy frame, but because my nose mask with its pipe looks like a trunk.

But I prefer feeling like an elephant to feeling like a zombie. This indeed was a miracle, though a very slow-acting miracle.

Share:Facebooktwitterredditpinterestlinkedinmail

Where is the Party?

One day you meet your friend Alice enjoying a nice walk with her husband Bob and their son Carl. They are excited to see you and they invite you to their party.

Alice: Please, come to our party on Sunday at our place at 632 Elm St. in Watertown.
Bob: My wife likes exaggerating and multiplies every number she mentions by 2.
Carl: My dad compensates for my mom’s exaggerations and divides every number he mentions by 4.
Alice: Our son is not like us at all. He doesn’t multiply or divide. He just adds 8 to every number he mentions.

Where is the party?

Share:Facebooktwitterredditpinterestlinkedinmail

Stern-Brocot Trees

Since I was a child I prided myself on knowing arithmetic. I knew how to add fractions. I knew that 2/3 plus 1/4 is 11/12. Some kids around me were struggling and often summed it up the wrong way by adding numerators and denominators separately and getting 3/7 as a result.

As I grew older I found more reasons to ignore the wrong way. For example, the result of such addition depends on the representation of a fraction, not on the fraction itself, and this was bad.

Oh well. I was growing older, but not wiser. Now mathematicians study this wrong addition of fractions. They call such a sum a mediant of two rational numbers. To avoid the dependency on the representation of fractions, the fractions are assumed to be in the lowest terms.

Let us start with the sequence of fractions: 0/1 and 1/0. This sequence is called the Stern-Brocot sequence of order 0. The Stern-Brocot sequence of order n is generated from the Stern-Brocot sequence of order n − 1 by inserting mediants between consecutive elements of the sequence. For example, the Stern-Brocot sequence of order 2 is 0/1, 1/2, 1/1, 2/1, 1/0.

Where are the trees promised in the title? We can build a portion of this binary tree out of the sequence of order n in the following manner. First, ignore the starting points 0/1 and 1/0. Then assign a vertex to every number in the sequence. After that, connect every mediant to one of the two numbers it was calculated from. More precisely, if a number first appeared in the i-th sequence, its only parent is the number that first appeared in the sequence i−1.

There is beautiful theorem that states that every non-negative rational number appears in the Stern-Brocot sequences. The proof is related to continued fraction. Suppose a rational number r is represented as a continued fraction [a0;a1,a2,…,ak], where ak is assumed to be greater than 1 for uniqueness. Then this number first appears in the Stern-Brocot tree of order a0 + a1 + a2 + … + ak + 1, and its parent is equal [a0;a1,a2,…,ak − 1].

My PRIMES student, Dhroova Ayilam, was working on a project suggested by Prof. James Propp. The goal was to find out what happens if we start with any two rational numbers in lowest terms. Dhroova proved that as with the classical Stern-Brocot trees, any rational number in a given range appears in the tree. His paper Modified Stern-Brocot Sequences is available at the arXiv.

Share:Facebooktwitterredditpinterestlinkedinmail

Andrei Zelevinsky’s Problems

Andrei ZelevinskyI was afraid of my advisor Israel Gelfand. He used to place unrealistic demands on me. After each seminar he would ask his students to prove by the next week any open problems mentioned by the speaker. So I got used to ignoring his requests.

He also had an idea that it is good to learn mathematics through problem solving. So he asked different mathematicians to compile a list of math problems that are important for undergraduate students to think through and solve by themselves. I still have several lists of these problems.

Here I would like to post the list by Andrei Zelevinsky. This is my favorite list, partially because it is the shortest one. Andrei was a combinatorialist, and it is surprising that the problems he chose are not combinatorics problems at all. This list was compiled many years ago, but I think it is still useful, just keep in mind that by calculating, he meant calculating by hand.

Problem 1. Let G be a finite group of order |G|. Let H be its subgroup, such that the index (G:H) is the smallest prime factor of |G|. Prove that H is a normal subgroup.

Problem 2. Consider a procedure: Given a polygon in a plane, the next polygon is formed by the centers of its edges. Prove that if we start with a polygon and perform the procedure infinitely many times, the resulting polygon will converge to a point. In the next variation, instead of using the centers of edges to construct the next polygon, use the centers of gravity of k consecutive vertices.

Problem 3. Find numbers an such that 1 + 1/2 + 1/3 + … + 1/k = ln k + γ + a1/k + … + an/kn + …

Problem 4. Let x1 not equal to zero, and xk = sin xk-1. Find the asymptotic behavior of xk.

Problem 5. Calculate the integral from 0 to 1 of x−x over x with the precision 0.001.

I regret that I ignored Gelfand’s request and didn’t even try to solve these problems back then.

I didn’t have any photo of Andrei, so his widow, Galina, sent me one. This is how I remember him.

Share:Facebooktwitterredditpinterestlinkedinmail

My Sleep Study

I recently had a home sleep study. I was given a small box which I attached to my chest. I also had to attach a thingy to my finger and put small tubes into my nose. It was relatively easy. Now I have my report:

The total time in bed is 468 minutes. Overall AHI is 37 events per hour. The supine AHI is 58 events per hour. The oxygen saturation baseline is 91%. The hypoxemic burden is 58 minutes. The oxygen saturation nadir is 63%. The heart rate ranges from 76-118 beats per minute.

I didn’t have a clue what all that meant so I hit the Internet. AHI means Apnea–Hypopnea Index, and a normal score is below 5. Anything above 30 indicates severe sleep apnea. Because mine is 37, I now have my diagnosis. My 63% oxygen saturation scared me the most. Wikipedia says 65% or less means impaired mental function. I do not need mental function when I sleep, but Wikipedia also says that loss of consciousness happens at 55%. What would happen if I lose consciousness while I sleep? Can I die? Will I wake up?

Overall the sleep study was a great thing. Now I know the diagnosis and there are ways to treat it. So I am looking forward to my improved energy and health.

But there was something in this report that would bother any mathematician. As you can see apnea gets worse when people sleep on their backs. (Thanks to this study I learned a new English word: supine means lying on the back.) The apparatus that I had to attach to my chest prevented me from sleeping on my stomach, one of my favorite sleep positions.

This report doesn’t say anything about my average AHI when I am not supine. If this average is low, then the solution might be to learn to never sleep on the back. It also means that the oxygen saturation nadir number is not very meaningful. It shows how bad it can be if I am forced to sleep on my back. It doesn’t say much about my standard sleep situation.

When I next see my doctor, I hope she’ll have answers to all my questions.

Share:Facebooktwitterredditpinterestlinkedinmail

Puzzling Grades Resolved

This story started when my student asked for an explanation for his grade B in linear algebra. He was slightly above average on every exam and the cut-off for an A was the top 50 percent of the class. I wrote a post in which I asked my readers to explain the situation. Here is my explanation.

The picture below contains histogram for a typical first midterm linear algebra exam.

First Midterm Histogram

The spike in the lowest range indicates zeros for those who missed the exam.

The mean is 74.7 and the median 81.5. As you can see the median is 7 points higher than the mean. That means that if a student performs around average on all the exams, s/he is in the bottom half of the class.

But this is not the whole story. In addition to the above, MIT allows students to drop the class after the second midterm. Suppose 30 students with lower grades drop the class; then the recalculated median for the first midterm for the students who finish the course goes up to 85. This is a difference of more than 10 points from the original average.

If this was a statistics class, then I could have told the puzzled student that he deserves that B. Instead I told him that he didn’t even have the highest score among those with Bs. Somehow that fact made him feel better.

Share:Facebooktwitterredditpinterestlinkedinmail