The origin of the significance of 47 can be traced to Star Trek: The Next Generation and Star Trek: Voyager writer Joe Menosky, who attended Pomona College in California. There is a club at Pomona called The 47 Society, which claims that there exists a mathematical proof that all numbers are equal to 47, and that the number 47 occurs with greater frequency in nature than other numbers – 74 makes frequent reappearances as well, as does 23 (half of 47 rounded down).
Joe Menosky first started including references to 47 in his scripts in the fourth season of TNG, and the in-joke quickly caught on among the rest of the staff. Since then, references to 47 have been included in many episodes and movies of all the modern series.
According to Ronald D. Moore, the number of 47 references in later seasons of Star Trek: Deep Space Nine declined as the production staff tired of the joke. (AOL chat, 1997)
The explanation resides on a different Wiki page.
I like that 47 is 42 adjusted for inflation.
With 42 arguably being the ultimate number. After all, it is the answer to the ultimate question of life, the universe, and everything.