Wednesday, February 26, 2014

Lucky Numbers

from Surely You're Joking, Mr. Feynman

One day at Princeton I was sitting in the lounge and overheard some mathematicians talking about the series for e^x, which is 1 + x + x^2/2! + x^3/3! + ... Each term you get by multiplying the preceding term by x and dividing by the next number. For example, to get the next term after x^4/4! you multiply that term by x and divide by 5. It's very simple.

When I was a kid I was excited by series, and had played with this thing. I had computed e using that series, and had seen how quickly the new terms became very small.

I mumbled something about how it was easy to calculate e to any power using that series (you just substitute the power for x).

"Oh yeah?" they said, "Well, then, what's e to the 3.3" said some joker - I think it was Tukey.

I say, "That's easy. It's 27.11."

Tukey knows it isn't so easy to compute all that in your head. "Hey, How'd you do that?"

Another guy says, "You know Feynman, he's just faking it. It's not really right."

They go to get a table, and while they're doing that, I put on a few more figures: "27.1126," I say.

They find it in the table. "It's right! But how'd you do it!"

"I just summed the series."

"Nobody can sum the series that fast. You must just happen to know that one. How about e to the 3?"

"Look," I say, "It's hard work! Only one a day!"

"Hay! It's a fake!" they say, happily.

"All right," I say, "It's 20.085."

They look in the book as I put a few more figures on. They're all excited now, because I got another one right.

Here are these great mathematicians of the day, puzzled at how I can compute e to any power! One of them says, "He just can't by substituting and summing - it's too hard. There's some trick. You couldn't do just any old number like e to the 1.4."

I say, "It's hard work, but for you, OK. It's 4.05."

As they're looking it up, I put on a few more digits and say, "And that's the last one for the day!" and walk out.

What happened was this: I happened to know three numbers - the logarithm of 10 to the base e (needed to convert numbers from base 10 to base e), which is 2.3026 (so I know that e to the 2.3 is very close to 10), and because of radioactivity (mean-live and half-life), I knew the log of 2 to the base e, which is 0.69315 (so I also knew that e to the 0.7 is nearly equal to 2). I also knew e (to the 1), which is 2.71828.

The first number they gave me was e to the 3.3, which is e to the 2.3 - ten - times e, or 27.18. While they were sweating about how I was doing it, I was correcting for the extra 0.0026 - 2.3026 is a little high.

I knew I couldn't do another one; that was sheer luck. But then the guy said e to the 3: that's e to the 2.3 times e to the 0.7, or ten times two. So I knew it was 20.something, and while they were worrying how I did it, I adjusted for the 0.693.

Now I was sure I couldn't do another one, because the last one was again by sheer luck. But the guy said e to the 1.4, which is e to the 0.7 times itself. So all I had to do is fix up 4 a little bit!

They never did figure out how I did it.

When I was at Los Alamos I found out that Hans Bethe was absolutely topnotch at calculating. For example, one time we were putting some numbers into a formula, and got to 48 squared. I reach for the Marchant calculator, and he says, "That's 2300." I begin to push the buttons, and he says, "If you want it exactly, it's 2304."

The machine says 2304. "Gee! That's pretty remarkable!" I say.

"Don't you know how to square numbers near 50?" he says. "You square 50 - that's 2500 - and subtract 100 times the difference of your number from 50 (in this case it's 2), so you have 2300. If you want the correction, square the difference and add it on. That makes 2304."

A few minutes later we need to take the cube root of 2 1/2. Now to take cube roots on the Marchant you had to use a table for the first approximation. I open the drawer to get the table - it takes a little longer this time - and he says, "It's about 1.35."

I try it out on the Marchant and it's right. "How did you do that one?" I ask. "Do you have a secret for taking cube roots of numbers?"

"Oh." he says, "the log of 2 1/2 is so-and-so. Now one-third of that log is between the logs of 1.3, which is this, and 1.4, which is that, so I interpolated."

So I found out something: first, he knows the log tables; second, the amount of arithmetic he did to make the interpolation alone would have to taken me longer to do than reach for the table and punch the buttons on the calculator. I was very impressed.

After that, I tried to do those things. I memorized a few logs, and began to notice things. For instance, if somebody says "What is 28 squared?" you notice that the square root of 2 is 1.4, and 28 is 20 times 1.4, so the square of 28 must be around 400 times 2, or 800. 

If somebody comes along and wants to divide 1 by 1.73, you can tell them immediately that it's 0.577, because you notice that 1.73 is nearly the square root of 3, so 1/1.73 must be one-third of the square root of 3. And if it's 1/1.75, that's equal to the inverse of 7/4, and you've memorized the repeating decimals for sevenths: 0.571428 . . .

I had a lot of fun trying to do arithmetic fast, by tricks, with Hans. It was very rare that I'd see something he didn't see and beat him to the answer, and he'd laugh his hearty laugh when I'd get one. He was nearly always able to get the answer to any problem within a percent. It was easy for him - every number was near something he knew.

One day I was feeling my oats. It was lunch time in the technical area, and I don't know how I got the idea, but I announced "I can work out in sixty seconds the answer to any problem that anybody can state in ten seconds, to 10 percent!"

People started giving me problems they thought were difficult, such as integrating a function like 1/(1+x^4), which hardly changed over the range they gave me. The hardest one somebody gave me was the binomial coefficient of x^10 in (1+x)^20; I got that just in time.

They were all giving me problems and I was feeling great, when Paul Olum walked by in the hall. Paul had worked with me for a while at Princeton before coming out to Los Alamos, and he was cleverer than I was. For instance, one day I was absent-mindedly playing with one of those measuring tapes that snap back into your hand when you push a button. The tape would always slap over and hit my hand, and it hurt a little bit. "Geez!" I exclaimed. "What a dope I am. I keep playing with this thing, and it hurts me every time."

He said, "You don't hold it right," and took the damn thing, pulled out the tape, pushed the button, and it came right back. No hurt.

"Wow! How do you do that?" I exclaimed.

"Figure it out!"

For the next two weeks I'm walking all around Princeton, snapping this tape back until my hand is absolutely raw. Finally I can't take it any longer. "Paul! I give up!  How do you hold it so it doesn't hurt?"

"Who says it doesn't hurt? It hurts me too!"

I felt so stupid. He had gotten me to go around and hurt my hand for two weeks!

So Paul is walking past the lunch place and these guys are all excited. "Hey, Paul!" they call out. "Feynman's terrific! We give him a problem that can be stated in ten seconds, and in a minute he gets the answer to 10 percent. Why don't you give him one?"

Without hardly stopping, he says, "The tangent of 10 to the 100th."

I was sunk: you have to divide by pi to 100 decimal places! It was hopeless.

One time I boasted, "I can do by other methods any integral anybody else needs contour integration to do."

So Paul puts up this tremendous damn integral he had obtained by starting out with a complex function that he knew the answer to, taking out the real part of it and leaving only the complex part. He had unwrapped it so it was only possible by contour integration! He was always deflating me like that. He was a very smart fellow.

Update (3/7/2014): A few of the calculations

e^3.3 = e^2.3 * e
e^3.0 = e^2.3 * e^0.7
e^1.4 = e^0.7 * e^0.7

No comments:

Post a Comment

Comments have temporarily been turned off. Because I currently have a heavy workload, I do not feel that I can do an acceptable job as moderator. Thanks for your understanding.

Note: Only a member of this blog may post a comment.