If you haven’t read Carl Sagan’s ‘Contact’, and dislike spoilers, stop reading now.
‘Contact’ is an epic novel about SETI and first contact, and Sagan uses the theme to explore intersections between science and religion. Evidence of alien intelligence causes all sorts of confusion for religions, with some arguing for ignorance to preserve faith, while the scientists unravel mysteries.
At the end of the book (but not the film) an alien tells the heroine to look for a clue to the nature of the universe in Pi. Pi is the ratio of a circle’s circumference to its diameter. It’s an irrational number, infinitely long.
Eventually, a supercomputer searching deep within Pi discovers a pattern. In base 11, millions of digits inside Pi, a pattern can be seen.
The trouble is, Pi is random. And if you have an infinitely long string of random numbers, then eventually every pattern occurs. That’s the nature of the beast.
I’ve been wondering about that ending for years. Sagan should have been enough of a scientist to know that a pattern (any pattern) inside a truly random number is inevitable. So was it just a lazy ending, or was he saying mathematics is his god?