A 17-tooth spur pinion has a diametral pitch of 8 teeth/in, runs at 1016 rev/min, and drives a gear at a speed of 508 rev/min. Find the number of teeth on the gear and the theoretical center-to-center distance.