We use supercell and frozen-magnon approaches to study the dependence of the
magnetic interactions in (Ga,Mn)As on the Mn concentration. We report the
parameters of the exchange interaction between Mn spins and the estimates of
the Curie temperature within the mean-field and random-phase approximations. In
agreement with experiment we obtain a nonmonotonous dependence of the Curie
temperature on the Mn concentration. We estimate the dependence of the Curie
temperature on the concentration of the carries in the system and show that the
decrease of the number of holes in the valence band leads to fast decrease of
the Curie temperature. We show that the hole states of the valence band are
more efficient in mediating the exchange interaction between Mn spins than the
electron states of the conduction band