The flame test is used to visually determine the identity of an unknown metal or metalloid ion based on the characteristic colour the salt turns the flame of a Bunsen burner. The heat of the flame excites the electrons of the metal ions, causing them to emit visible light.
Sr2+−CrimsonredcolourCu2+−BluegreencolourCa2+−BrickredcolourBa2+−Palegreencolour
Hence, the answer is 4.