How can I decode Lycoming engine number?
I got the following information for this website:



Also if you scroll down here you can see the model numbers that you talk about in your question.  



The last character seems to be an indication of the variant of the engine as shown in the document.  The D indicates Dual Magnetos and the 2 or 3 seems to indicate some type of counterweight application.