DFT-study of the energetics of perovskite-type oxides LaMO3 (M = Sc–Cu)