Please explain the variable valency of manganese

Please explain the variable valency of manganese.

Mn with halides forms MnX2 shows +2, with F shows +3,4.
with O ---- +7, 4,3,2
The middle of the d series exhibits max O.S . This arrises due to incomplete filling of d orbital.