What is the ultimate answer to life, the universe, and everything? 42, of course. But why? In Scientific American, Jean-Paul Delahaye, computer science professor emeritus at France's University of Lille, explores why 42 is such a magic number in mathematical culture and science fiction geekdom. From Scientific American:

Apart from allusions to 42 deliberately introduced by computer scientists for fun and the inevitable encounters with it that crop up when you poke around a bit in history or the world, you might still wonder whether there is anything special about the number from a strictly mathematical point of view.

The number 42 has a range of interesting mathematical properties. Here are some of them:

The number is the sum of the first three odd powers of two—that is, 2

^{1}+ 2^{3}+ 2^{5}= 42. It is an element in the sequencea(n), which is the sum ofnodd powers of 2 forn> 0. The sequence corresponds to entry A020988 in The On-Line Encyclopedia of Integer Sequences (OEIS), created by mathematician Neil Sloane. In base 2, thenth element may be specified by repeating 10ntimes (1010 … 10). The formula for this sequence isa(n) = (2/3)(4^{n}– 1). Asnincreases, the density of numbers tends toward zero, which means that the numbers belonging to this list, including 42, are exceptionally rare.The number 42 is the sum of the first two nonzero integer powers of six—that is, 6

^{1}+ 6^{2}= 42. The sequenceb(n), which is the sum of the powers of six, corresponds to entry A105281 in OEIS. It is defined by the formulasb(0) = 0,b(n) = 6b(n– 1) + 6. The density of these numbers also tends toward zero at infinity.Forty-two is a Catalan number. These numbers are extremely rare, much more so than prime numbers: only 14 of the former are lower than one billion.

"For Math Fans: A Hitchhiker's Guide to the Number 42" *(Scientific American)*

*image: detail of jacket of The Hitchhiker's Guide to the Galaxy, 25th Anniversary Edition by Douglas Adams (Amazon)*