"If we add up the total amount of energy trapped by CO2 from the gallon of gas over its atmospheric lifetime, we find that our gallon of gasoline ultimately traps one hundred billion (100,000,000,000) kilocalories of useless and unwanted greenhouse heat. The bad energy from burning that gallon ultimately outweighs the good energy by a factor of about 40 million."(*) Except I think the last number should be 3.5 million, not 40 million. Archer says a gallon of gasoline "yields about 2500 kilocalories of energy," which is 2.8 MJ/L. But all the numbers I've found are about 32 MJ/L, such as here and here and here. That factor of 11.5 knocks down the final ratio to a still impressive 3.5 million.
(If I made a mistake, let me know.)