"Good morning," said Deep Thought at last.
"Er ... good morning, O Deep Thought," said Loonquawl nervously, "do you have ... er, that is ..."
"An answer for you?" interrupted Deep Thought majestically. "Yes, I have."
The two men shivered with expectancy. Their waiting had not been in vain.
"There really is one?" breathed Phouchg.
"There really is one," confirmed Deep Thought.
"To Everything? To the great Question of Life, the Universe and Everything?"
Both of the men had been trained for this moment, their lives had been a preparation for it, they had been selected at birth as those who would witness the answer, but even so they found themselves gasping and squirming like excited children.
"And you're ready to give it to us?" urged Loonquawl.
"Now," said Deep Thought.
They both licked their dry lips.
"Though I don't think," added Deep Thought, "that you're going to like it."
"Doesn't matter!" said Phouchg. "We must know it! Now!"
"Now?" inquired Deep Thought.
"All right," said the computer, and settled into silence again. The two men fidgeted. The tension was unbearable.
"You're really not going to like it," observed Deep Thought.
"All right," said Deep Thought. "The Answer to the Great Question ..."
"Yes ... !"
"Of Life, the Universe and Everything ..." said Deep Thought.
"Yes ... !"
"Is ... " said Deep Thought, and paused.
"Yes ... !"
"Is ... "
"Yes ... !!! ... ?"
"Forty-two," said Deep Thought, with infinite majesty and calm.
-- Douglas Adams, The Hitchhiker's Guide to the Galaxy, Chapter 27
In fact it was simply chosen because it was a completely ordinary number, a number not just divisible by two but also by six and seven. In fact it's the sort of number you could, without any fear, introduce to your parents.
-- Douglas Adams (quoted in The Hitchhiker's Guide to the Galaxy Original Radio Script)
At this moment the King, who had been for some time busily writing in his note-book, cackled out `Silence!' and read out from his book, `Rule Forty-two. ALL PERSONS MORE THAN A MILE HIGH TO LEAVE THE COURT.'
Everybody looked at Alice.
`I'M not a mile high,' said Alice.
`You are,' said the King.
`Nearly two miles high,' added the Queen.
`Well, I shan't go, at any rate,' said Alice: `besides, that's not a regular rule: you invented it just now.'
`It's the oldest rule in the book,' said the King.
`Then it ought to be Number One,' said Alice.
-- Lewis Carroll, Alice's Adventures in Wonderland, Chapter 12.
The helmsman used to stand by with tears in his eyes; he knew it was all wrong, but alas! Rule 42 of the Code, "No one shall speak to the Man at the Helm," had been completed by the Bellman himself with the words "and the Man at the Helm shall speak to no one." So remonstrance was impossible, and no steering could be done till the next varnishing day. During these bewildering intervals the ship usually sailed backwards.
-- Lewis Carroll, The Hunting of the Snark, Preface
42 is the 5th Catalan number.
-- What's special about this number?
Time is so short and I’m sure
There must be something more
-- Coldplay, "42"
For more see here, here, here, here and here.