Sunspot numbers, interplanetary magnetic field, and cosmic ray intensity at earth: Nexus for the twentieth century