"P" (P-51, P-38...) stands for pursuit. They changed it to "F" (F-51, F-86....) for fighter in the late 40's or early 50's. "B" (B-17, B-52) stood for bomber and still does. There is also an "A" (A-20, A-10) designation, stands for attack. Some time in the 60's they started the numerical order at 1 again. That's why you had an F-106 (which is older), serving along side the F-4, (newer).
This can get real confusing when they redesignate an aircraft.
ex. The Douglas A-26 was changed to B-26 after WWII. However, there was a B-26 made by Martin during the war, (this is the one referenced as having the lowest loss rate). To make this worse, both were twin engined aircraft of similar size. Also the Douglas A-26/B-26 had a very low loss rate, (some say lower than the Martin B-26).
Yes I'm a WWII aircraft nut. This stuff has been locked up in my head since I was a kid!