A 1.345-g sample of a compound of oxygen and barium was dissolved in the hydrochloric acid to give a solution of barium ion, which was then precipitated with an excess of potassium chromate to give the barium chromate, BaCrO4 which is having 2.012 g. What is the formula of the compound?