In the Star Trek universe, Starfleet vessels have registry numbers that typically begin with the prefix NX or NCC. The most famous of these is NCC-1701, the registry number of the USS Enterprise and its successors.
In-universe, these are assigned to starships roughly according to the order in which they are built and commissioned. (The successor Enterprises are an exception as they persist with the NCC-1701 registry, but with the addition of a letter suffix to distinguish them.)
Out-of-universe, do these registry numbers have any special significance? How were they chosen?
For instance, the USS Voyager is NCC-74656. It seems uninspired at first glance. Does the particular number 74656 have any hidden (or obvious) meaning? Why did the writers or creators choose it?
On the other hand, were NCC-1701 and NCC-1864 (the latter being the registry of the USS Reliant) derived from the years 1701 and 1864, respectively? For the latter, the USS Reliance served in the American Civil War (as part of the Potomac Flotilla) and was scuttled in 1863. Is there any connection? Gene Roddenberry was known to be a war buff, and Nicholas Meyer (directed of The Wrath of Khan, in which the Reliant appeared) was a fan of naval themes.
Any interesting information about any registry numbers appearing in Star Trek would be great.