Nippon Kogaku had no way of knowing, in 1947-'48, that its cameras would one day be so popular. Their 50mm lens designs were all for the Canon Hansa, which was based on the Leica standard lens, which is actually a 51.8mm lens. Fairly late in developing their first camera, Nikon decided to use a mount based on the Contax, whose 50mm lenses are actually 50.0 millimeters. But Nikon didn't want to go through the hassle of reformulating the lens for a camera that might well have bombed. So the Nikkor lenses are 51.8mm. It gets complicated because in the Contax/Kiev/Nikon mount, the focus helical for 50mm lenses is built into the camera body and couples to a rangefinder mechanism that is calibrated to the 50mm lens.
Long story short -- lenses are interchangeably accurate when focused to infinity, but the closer you focus, the more innaccurate they become. With 35mm and wider lenses, depth of field masks the difference. With 50mm lenses, shooting at f/4- to 5.6 can usually mask the difference. With 85mm and longer, Contax and Nikkor lenses can accurately interchange only if they're focused on infinity.