Ready for Prime Time?

Prime numbers never cease to enthrall and fill us with wonder. There is something about them, I don’t know what, but if you catch the bug you will never stop being amazed. (Prime numbers are those that have no factors other than 1 or themselves, e. g. 7 or 13)

Take Mersenne numbers. They are named after the 17th century French monk who studied them and are of the form:  2^n – 1, or 2 raised to the power n for some positive integer n, minus 1. The first few are: 1, 3, 7, 15, 31, 63, 127, 255 …. Since 4 out of the above 7 (not counting the number 1, which is outside the realm of numbers eligible to be prime) are prime, Mersenne thought that this series would be a rich source of prime numbers. He conjectured that an infinite number of these numbers would be prime – something that may be true but hasn’t been proven yet.

But the Mersenne series does yield some interesting properties. First, the exponent of 2 (i. e. the power to which 2 must be raised in a Mersenne number) must itself be prime! And even then very few prime exponents actually result in a Mersenne prime. Even so, last year, the largest prime currently known to man. a Mersenne prime, was found using fast computer searching. It is the 48th Mersenne prime and has more than 17 million digits!

The largest prime known: 257,885,161 − 1, a Mersenne prime.

(If you can be the first to find a prime number with more than a hundred million digits I believe there is a prize of $150,000 awaiting you  - so go at it!)

Mersenne numbers are also an example of a rapidly evolving area of mathematics called Dynamical Sequences. Here you generate numbers, starting with a seed, such as zero and repeatedly plugging into a simple algebraic expression. For example you can generate the Mersenne numbers by using the expression 2x+1. Start by plugging x=0 and the expression calculates out 1. Now plug 1 into the expression and you get 3. Repeat and you get 7 followed by 15, 31, 63, 127 …  i. e. the Mersenne numbers.

Holly Kreiger, currently at MSRI* (see below) in Berkeley, is studying the arithmetic properties of some magical dynamical sequences and coming up with mind blowing results! MSRI has a video series at the website Numberphile.com full of fascinating math games, puzzles, tricks and number facts. To see a wonderful show on her dynamical sequences and how prime numbers crop up everywhere see her presentation by clicking her picture below. Do see it all the way to the end for she has an unexpected surprise!

*MSRI – Mathematical Sciences Research Institute, Berkeley. Website here. MSRI is an advanced institute located in the Berkeley hills dedicated to the advancement of fundamental math and also to the cultivation of its beauty, power and importance.

I have the privilege to support some of their activities and in return get a rich exposure to fun math people and cutting edge researchers in the field. Next time you’re in Berkeley check them out. Ashok

Posted in Cosmology, Education, Fun, Math, Philosophy, Puzzles, Science | Leave a comment

Six Cherished New Year’s Wishes

I’ve been thinking Math this last week. We had the Math Lover’s Forum at our house – a gathering of Math enthusiasts in an intimate setting discussing a problem of deep interest.

Prime Obsession

Prime Obsession

One of the attendees, Sean Hennessee,  brought along a book for me, Prime Obsession, by John Derbyshire. As it says on the subtitle of the book, it’s about: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics.

It’s amazing how much fun Math books like this can be – you really don’t even need to be a very deep scholar to love them, although it helps to be curious about the subject. I remember reading One, Two Three.. Infinity by George Gamow many years ago – a book that got me started loving all the math lore and magic.

Another fun book that I read many, many years ago is, A Mathematician’s Apology by G. H. Hardy, the celebrated Trinity College (Cambridge) don who discovered S. Ramanujan. He describes his own life as a mathematician elegantly and walks us through the corridors of Trinity College where the likes of Bertrand Russell, John Maynard Keynes, John Edensor Littlewood, James Clark Maxwell were doing world-changing science and where Ramanujan spent several years, a complete social misfit but a huge natural genius that everyone at Cambridge tried to adopt and understand.

There are many fun stories about Hardy and other prominent Mathematicians (Gauss, Euler etc.)  in Derbyshire’s book along with an exploration of their genius and passion for math. The “Unsolved Problem” that the book talks about is The Riemann Hypothesis,  one of 7 so called Millennial problems in Mathematics that has a $1,000,000 prize for its proof. It is the most talked about enigma that the math community incessantly talks of and is indeed a problem with a lot of astonishing twists and turns, all brought out very nicely in this book.

Here’s a fun story about G. H. Hardy from this book, which illustrates his interests and mindset. In a postcard to a friend around 1920 he talked about his six most cherished New Year’s Wishes:

1. Prove the Riemann Hypothesis.
2. Make 211 not out in the fourth innings of the last Test Match at the Oval in London.
3. Find an argument for the non-existence of God which shall conc=vince the general public
4. Be the first man at the top of Mt. Everest.
5. Be proclaimed the first president of the USSR, of Great Britain and Germany!
6. Murder Mussolini

Isn’t that a fantastic list! Wouldn’t you just love to chat with a genius who had that kind of New Year’s wish list?

What would be your six most cherished wishes?

In my next blog my New Year’s wishes (It’s New Year’s day tomorrow by the Hindu calendar. Happy Diwali and New Year’s everyone!). Also in a future blog another fun story from Hardy!

Posted in Cosmology, Education, Fun, Innovation, Math, Philosophy, Puzzles, Science | Leave a comment

Wolfram Alpha – A Wonderful Math Knowledge Engine

I was talking to my smart nephew the other day. He loves math and loves even more to stump me with math riddles and puzzles.

Me: Let’s talk about some fun problems with prime numbers*. I’m thinking of two prime numbers that add up to 753, what are they?

Nephew (instantly): Oh, come on, Uncle. That’s too easy. Clearly if the sum of two numbers is odd (in this case 753) then one of them must be even and the other odd. But the only even prime number is 2, so your numbers are 751 and 2.

Me: OK, you’re a genius.

Nephew: I have one for you. Think of prime numbers with a single digit repeated many times. The smallest such number is 11. What’s the next one?

Me: OK, Let’s see. A single digit repeated. A number like 777, hmm. Clearly the digit cannot be anything other than a 1 because if it’s any other digit like 7 the number will be divisible by 7 and hence not prime.

Nephew: Good

Me: So the prime will be composed of repeating 1′s. It’s not 111 because 111=37×3. It’s not 1111 because that can be divided by 11. What about 11,111? How do I check what the factors are for 11,111 or whether it’s a prime?

Nephew: You’re on the right track, my smart but oh-so-out-of-touch Uncle. Have you tried a great tool called Wolfram Alpha? It’s an Answer Engine as opposed to a mere search engine. It actually calculates your query using the famous computational program, Mathematica, written by scientist, Stephen Wolfram. Among other things it will factorize any number for you – within limits, of course. No one can factorize extremely large numbers, those containing say 100 digits, yet. But Wolfram Alpha will do any math that is possible, even including symbolic math and closed form equation solving,  and will give you the latest conjectures to boot.

Try it and see if you can factorize 11,111.

So I pulled up my iPad, went to the site http://www.wolframalpha.com and typed in “factorize 11,111” as below:

Wolfram Alpha Query

Back came the answer:

Screen Shot 2013-02-18 at 4.12.40 PM

It had factored my number: 11,111 = 41 × 271.

Me: You have shown me a great new resource, dear nephew. Now I shall try numbers with repeated 1′s to find a prime number.

Nephew: Great! And did you notice that you only need try numbers with 1′s repeated a prime number of times? So you needn’t try 1 repeated six times or 111,111 because 6 is composite. Since 6=3×2, you know 111,111 will be divisible by 11 or 111. Right?

Me: I was just going to say that myself. So the next numbers we will try will have repeating 1′s: 7, 11, 13, 17, 19, 23…. times. We tried them on the Wolfram Alpha Math Engine and got:

7:     1 111 111 = 239 × 4649
11:    11 111 111 111 = 21 649 × 513 239
13:    1 111 111 111 111 = 53 × 79 × 4187 × 265 371 653 × 14 064 697 609
17:    11 111 111 111 111 111 = 2 071 723 × 5 363 222 357
19:    1 111 111 111 111 111 111 = Prime!!!

Success! The smallest prime number with a repeating digit (after 11) is 1,111,111,111,111,111,111 or 1 repeated 19 times! We would never have been able to compute this using any conventional program like Excel or a traditional search!

Turns out the next one is 1 repeated 23 times and then we don’t see any more primes of this form for quite a while. They are there though. Many have been found but it’s a tough job even for very fast supercomputers.

Wolfram Alhpa is a real boon. Try it if you love playing with numbers or symbolic math. Here’s one last result I got playing with this fantastic math engine. I asked for the integral of secant(x). The answer, along with graphs, a Taylor’s series expansion and much more came out as below:

Screen Shot 2013-02-18 at 4.37.01 PM

What a fun resource available to all math freaks!

*(Prime numbers, as most of you know are numbers that cannot be divided by any other number, except of course 1. Examples are: 2, 7, 11 but not 21 because that can be divided by 3 and 7).
Posted in Education, Fun, Innovation, Math, Puzzles, Science, Uncategorized | Tagged | 7 Comments

“Goodness Gracious Me!” – A Classic from 1960

Millionairess PosterPeter Sellers has done some wonderful roles in his life time. In 1960 he starred in the movie “The Millionairess” with Sophia Loren. It is a hilarious comedy in which Peter Sellers is an Indian doctor living in London and Sophia Loren is his millionairess patient. She has fallen in love with him and feigns all kinds of illnesses to come and see him.

There is a great song from this movie called “Goodness Gracious Me!” which was a hit, particularly in India. It has hilarious lyrics, e.g.

Sellers loren millionairessFrom New Delhi to Darjeeling
I have done my share of healing,
And I’ve never yet been beaten or outboxed,
I remember that with one jab
Of my needle in the Punjab
How I cleared up beriberi
And the dreaded dysentery,
But your complaint has got me really foxed.

When I was a teenager in New Delhi this song used to play on the radio a lot and hearing it again it brought back big memories and I laughed hard once again as I did in those magnificent 1960′s and my college days. How fondly I remember them!

I’m appending a YouTube rendering of this song below. Please watch and you will love it. Also rent the movie, The Millionairess if you can find it. It’s a lot of fun.

Some things are evergreen!

Posted in Fun, Old Movies, Travel, Vacation | Tagged , | 4 Comments

The Cure for Deficits

Our Federal Deficit is in the headlines again. It’s a bi-i-i-g deal! (That’s why I’m capitalizing the F and the D). There’s talk everywhere of the fiscal cliff and debt ceilings and who should pay and what to cut … All the talk is, of course, dishonest and does not give any inkling to the average American about what the real picture is. The press simply jumps on the wagon of the politically self-serving parameters in this debate, reports “both sides” and basks in the improved ratings for the media garbage they generate. It is too lazy to learn the real perspective on our federal financial situation. So I am laying out a perspective here that, maybe, gives us a tool to repair this problem.

Everyone knows by now that our national debt stands at $16 trillion. There’s even a national debt clock that shows this every time some political hack wants to make an issue. But what does this number mean – that so far we have spent $16 T more than we collected in taxes at the federal level. To understand the debt and the annual deficit we must understand a key aspect of how the government does its accounting.

The government does its books on a Cash Basis i. e., all the federal accounting, budgeting and assessments are done based on annual cash inflows and cash outlays, something no 21st (or even late 20th) century financial entity would be allowed to do. Only the government among major economic bodies (Corporations, NGO’s, Partnerships etc) does business and reporting this way and it distorts the picture immeasurably. If we want to have any chance of understanding the public products, services and obligations and the time lag with which their costs and benefits kick in we have to unravel this cost basis accounting and see what’s lurking below.

Cost Basis does not recognize accrued costs and obligations. The federal government has many, many future obligations (that we can define and quantify to varying degrees right now) that it does not include in its deficit calculations. Our budget deficits are based solely on what the government pays  and receives in taxes every year, not the obligations we accrue.

______________________________________________________

[ASIDE]
In this form of accounting, our deficits are not caused at all by the major entitlements so viciously under fire by Boehner, Paul Ryan and their ilk. Quite the contrary, the personal payroll taxes that are used to pay for these services have more than paid for their cost. On a cash basis Social Security and Medicare have a surplus of over 2.5 trillion dollars right now. So here’s how our debt clock looks if we break out these “Entitlements”:

Federal Debt (non Entitlements):         $18.5 Trillion
Surplus (Entitlements):                              $2.5   Trillion
Net Debt:                                                    $16 Trillion

It’s true that in 15 to 20 years this surplus will evaporate and Social Security and Medicare will go “bankrupt” if we do nothing. By “bankrupt” we mean that future obligations will require more taxes or deficit spending – just like we pay for most of the other government right now! But do understand that the current debt of $16 T is not a result of these Entitlements.

______________________________________________________

If we are going to use an accrual standard to measure Entitlements and their impact on our debt then we have to use the same standard to measure other future obligations of the government and the hue and cry must be just as vicious about paying for those or going “bankrupt”.

Let’s look at three of the other (out of many) accrued deficits:

1. Infrastructure Repair and Upgrade Deficit. By some measures we are reaching dangerous levels here – budgets have been slashed for infrastructure since the 1980′s. The  Accrued Deficit: $5 Trillion (or so, give or take a trillion). See figure for 5-year shortfall in chart to right

2. Education and Training Deficit. Part of our chronic unemployment comes from a neglect of the training of our work force. We need an urgent Repurposing of our Labor pool if we are to compete in the 21st century. If we start now the results will still take many years to materialize so we can’t wait. Tom Friedman, Bill Gates and El Arien of Pimco, to name three prominent people have been screaming about this. Estimated Accrued Deficit: ?? Trillions.

3. Insurance Deficit. Our government has a large national  insurance function. For example. It insures nuclear plants, banks and savings deposits etc. It insures against natural disasters such as hurricanes, earthquakes etc., against major accidents, such as oil spills or coal mining accidents, against disease outbreaks, security breaches, such as terrorism, against unemployment and destitution. You name it. A whopping percentage of the government function is insurance – we need this public good, it seems for without it there can be no power plants, oil drilling, banking or the safety net. But unlike private sector Insurance companies the government does not have to set aside reserves to pay for its future obligations. When these obligations kick in, as during a severe recession (2008-2010), or a natural disaster, big deficits are generated. Net Insurance Deficit: 3-5 Trillions by some estimates – depends on assumptions about future economic conditions also.

OK, I don’t need to name all deficits not explicitly included in the debt of $16 Trillion.

Good News
This is HORRIBLE, you say. Is there any good news that points the other way? Yes, there is. And this is where some of the solutions may lie.

When you account on a Cost Basis you do not distinguish between Expenditures and Capital Investments. Both are treated as an outflow of cash. However, capital investments are not cash merely consumed. They produce future cash flows and other benefits. These future benefits are also not included in a Cash Basis Debt number. So when proper Capital Expenditures are accrued properly the real deficit does not grow as fast as the Cash Basis deficit and the future cash flows produced are unaccounted deficit reducers. Good news, huh?

This fact can be used to mitigate our employment problem and reduce the debt at the same time!

Here’s an example:
Say you want to produce 3 million  jobs per year (as Romney said he would magically do by cutting marginal tax rates). The Government can borrow and spend about $100 billion (per year for as long as it takes – probably one presidential term) rebuilding our infrastructure. Each $billion produces 14,000 direct jobs and about the same number indirect ones. (See my blog here for details). So $100 billion will produce about 3 million jobs. On a cash basis you have just increased the debt by $100 billion/year. But since you have reduced the infrastructure debt by the same $100 billion the net deficit (on a rational accrual basis of accounting) is unchanged. The cost of borrowing: Less than 1%/year for a five year period. Add in gains from: not having to pay unemployment benefits and increases in income tax revenues and this is a hugely beneficial way to reduce the deficit while seeming to increase it.

We need this kind of bold analysis to create policies that have a chance to get us out of our mess.

The second part of the solution can be from technical innovation, productivity increases and a faster growing economy. During the last century the US grew at a compounded rate of 3% for generations because the US developed every new technology worth inventing – airplane, nuclear tech, integrated circuit, internet, satellites and GPS, biotech … you name it.

I saw an interview with Professor Sadoway from MIT working on materials technology (on Steven Colbert’s TV program) who is close to making a battery that can store 100 times the power than today for the same amount of weight. If perfected this technology alone could bring down the price of oil to $20 per barrel (he said) by boosting alternative energy production.

As for our Medicare costs and medical costs in general we are projecting to spend $30 Trillion in the next decade as a nation on healthcare. These could come down substantially in the coming years due to converging technologies that will produce zero-cost diagnostics and personalized cost-effective wellness solutions. See my blog on this here.

This kind of solution has to be adopted by our nation as a matter of policy. If deficit spending is required to increase the chances of such technologies coming to fruition then let’s do it, despite the howling Republican luddites. (OK, they’re not all Republican and that was a cheap dig).

Anyway the point is that the CBO can project burgeoning deficits all they want – they have no way to assess the power of exponentially growing innovation and technologies. If we are unable to continue innovating then, yes indeed, our deficits will be untenable and we will inevitably see a horrible decline in our standard of living.

But what if are able to embrace the vision in Peter Diamandis’ book, Abundance, throw the anti-science medievalists out of our leadership and decide as a country to forge ahead on the vision….. the deficits will vanish.

My fingers are crossed.

.

Posted in Current Events, Education, Healthcare, Innovation, Investing, Medicine, Money, Politics, Science, Uncategorized | Leave a comment

The Witches’ Brew – A Halloween Incantation

It’s Halloween night! In the gathering gloom the streets of our little town are filling up with trick-or-treaters. Cute youngsters dressed up as ghouls and monsters and gnarly witches are spooking up the neighborhood and the houses are draped with spiders’ webs and howling sounds of evil spirits and the ominous shrieking of ravens or flying raptors.

I completed the New York Times crossword puzzle today where the theme was taken from the Witches’ Brew scene in the play, Macbeth, the great Shakespearean tragedy classic. The scene is a dark cave with a cauldron boiling in the middle to the sound of howling winds and thunder. Four shriveled hags are tending to the witches’ brew in the cauldron and throwing in ingredients as they shriek their evil portents and incantations. Four of the answers in the puzzle were Ingredients in the witches’ brew:

    • tooth of wolf
    • blind worm’s sting, and
    • lizard’s legs
    • slips of yew

A delightful puzzle indeed for Halloween night. Setting the right mood for the morbid delights of this holiday that seemingly celebrates evil and brings us in a benign way with the objects of our fear and the dark side of the world.

Shakespeare’s lines for the witches are beautiful – in rhyme and meter suitable for incantation and the ingredients are all the scary images of the Elizabethan mind. Here’s an excerpt:

WITCH #1.  Thrice the brinded cat hath mew’d.
WITCH #2.  Thrice and once, the hedge-pig whin’d.
WITCH #3.  Harpier cries:—’tis time! ’tis time!
ALL.  Double, double toil and trouble;
Fire burn, and caldron bubble.
WITCH #2.  Fillet of a fenny snake,
In the caldron boil and bake;
Eye of newt, and toe of frog,
Wool of bat, and tongue of dog,
Adder’s fork, and blind-worm’s sting,
Lizard’s leg, and owlet’s wing,—
For a charm of powerful trouble,
Like a hell-broth boil and bubble.
ALL.  Double, double toil and trouble;
Fire burn, and caldron bubble.
WITCH #3.  Scale of dragon; tooth of wolf;
Witches’ mummy; maw and gulf
Of the ravin’d salt-sea shark;
Root of hemlock digg’d i the dark;
Liver of blaspheming Jew;
Gall of goat, and slips of yew
Sliver’d in the moon’s eclipse;
Nose of Turk, and Tartar’s lips.
………..

So this is what you put in a witches’ brew: Eye of newt, toe of frog, wool of bat and tongue of dog.   Adders’s fork and blind-worm’s sting, Lizards’s leg and owlet’s wing….

Even some politically incorrect stuff: Liver of a blaspheming Jew??

I love it. How delicious! Only Shakespeare can invoke such dark imagery.

In this spirit I thought it might be fun to come up with my own incantation on what terrifies me on this Halloween night. Shakespeare I’m not, but here goes (and certainly I’m not hiding my lack of political correctness):

ALL: Double, double toil and trouble;
Fire burn, and caldron bubble.
WITCH #1: In three debates all slick and shrewd
A grim charade have we viewed
WITCH #2: Thrust and parry, lie, intrude
Play with facts, be loud and rude
WITCH #3: And now election doth come nigh
Whose snake oil will the nation buy?

ALL: Double, double toil and trouble;
Fire burn, and caldron bubble.

WITCH #1: A carrion-rippin’ raptor’s beak
Vacuous, sneering Palin-speak
Infrastructures’ slimy rust
Workers’ savings going bust
Wiggling vermin in your creel
Healthcare Law –  loud repeal
Spend and borrow, beg or steal
Private capital, vulture deal!
Mafia bosses in the pews
Blatant theft of Union Dues
False debates and jaundiced views
Outright lies on Fox News

WITCH #2: Workers’ burden – broken backs
Minimum wage, social cracks
Greedy poor – lazy blacks
Quick, pledge the rich – no new tax!
No science, please they’re flat earthers
Paranoid – blatant birthers!
They Sing “America” full of smiles
And stash the loot in Cayman Isles!

OK. You get the drift. Write your own Halloween scary verse. Post it here and let everyone get a good scare!

Posted in Current Events, Education, Evolution, Halloweeen, Healthcare, Innovation, Money, Politics, Vacation | 8 Comments

The 13-Link Chain Puzzle and Other Fun Posers

Last Friday at the Mathematical Sciences Research Institute (MSRI) I met Gary Antonick, who writes a numbers blog for the New York Times, a fun blog that you must check out. I gave him a puzzle and he loved it so much he thought it was going to be one of the best he has posted on his blog.

We had gathered together at the Berkeley site of MSRI for an annual celebration to honor Martin Gardner, the famous gamer, puzzler and magician who wrote the column Mathematical Games for The Scientific American for 25 years. Many of us grew up loving his column and spent endless hours solving his posers and reveling in his tricks.

Elwyn Berlekamp, the well known author of several books on Nim-like games was there, playing Dots and Boxes with kids and other visitors. He runs a nifty outfit called Gathering for Gardner, whose website is here. Their logo reproduced below is really cool as it reads exactly the same when you turn it upside down – this is the sort of thing Martin Gardner loved.

In the spirit of Martin Gardner many math puzzles were presented to the attendees.

The 13-LInk Chain

I discussed the following 13-link chain puzzle with Gary – a puzzle that I have known since my grandfather posed it to me many, many years ago and one I had immensely enjoyed. Gary loved the puzzle and has posted it on the New York Times blog today. So check it out, see if you can solve it and send me the solution, or your comments or questions. I’m reproducing the puzzle below as well:

The 13-Link Chain Puzzle
You have a balance scale and a single chain with thirteen links. Each link of the chain weighs one ounce. How many links of the chain do you need to break in order to be able to weigh items from 1 to 13 ounces in 1-ounce increments?

As with all puzzles that have Martin Gardner’s elegance and spirit, this puzzle is very pleasing at many levels and encompasses some more general math patterns that are endlessly extended by people who then  pose ever-more evolutionary puzzles based on this.

For those of you who want more of these fun puzzles try out the ten off-the-shelf classical (and simple) Martin Gardner puzzles here. (From Elwyn’s Gathering for Gardner site)

Happy Solving!

Posted in Education, Innovation, Puzzles, Science | 17 Comments