Sheldon's writers, like much of Hollywierd today, just stole the idea. Hopefully they gave proper attribution.
O Deep Thought computer," he said, "the task we have designed you to perform is this. We want you to tell us...." he paused, "The Answer."
"The Answer?" said Deep Thought. "The Answer to what?"
"Life!" urged Fook. "The Universe!" said Lunkwill. "Everything!" they said in chorus.
Deep Thought paused for a moment's reflection. "Tricky," he said finally. "But can you do it?" Again, a significant pause. "Yes," said Deep Thought, "I can do it."
"There is an answer?" said Fook with breathless excitement.
"Yes," said Deep Thought. "Life, the Universe, and Everything. There is an answer. But, I'll have to think about it."
... Fook glanced impatiently at his watch. ;How long?; he said.
;Seven and a half million years,; said Deep Thought.
Lunkwill and Fook blinked at each other. ;Seven and a half million years...!; they cried in chorus.
;Yes,; declaimed Deep Thought, ;I said I;d have to think about it, didn;t I?"
[Seven and a half million years later.... Fook and Lunkwill are long gone, but their descendents continue what they started]
"We are the ones who will hear," said Phouchg, "the answer to the great question of Life....!"
"The Universe...!" said Loonquawl.
"And Everything...!"
"Shhh," said Loonquawl with a slight gesture.
"I think Deep Thought is preparing to speak!"
There was a moment's expectant pause while panels slowly came to life on the front of the console. Lights flashed on and off experimentally and settled down into a businesslike pattern. A soft low hum came from the communication channel.
"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?"
"Yes." 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 Loonsuawl.
"I am."
"Now?"
"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.
"Yes! Now..."
"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.
"Tell us!"
"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.
from Douglas Adams, The Hitchhiker's Guide to the Galaxy