Yes, oxygen gas can be prepared by heating certain compounds. One of the most common ways to obtain oxygen gas is by heating potassium trioxonitrate (V) or what is commonly known as potassium nitrate (KNO3). When potassium nitrate is heated, it undergoes a chemical reaction that produces oxygen gas and potassium oxide (K2O). The balanced chemical equation for this reaction is:
2KNO3(s) → 2KNO2(s) + O2(g)
Therefore, by heating potassium nitrate, oxygen gas can be produced. The other compounds listed, such as ammonium trioxonitrate (V), ammonium trioxonitrate (III), and manganese (IV) oxide, do not produce oxygen gas when heated.