  We present a simple physical mechanism that can account for the observed
stellar mass spectrum for masses $\ms \simgreat 0.5 \solm$. The model depends
solely on the competitive accretion that occurs in stellar clusters where each
star's accretion rate depends on the local gas density and the square of the
accretion radius. In a stellar cluster, there are two different regimes
depending on whether the gas or the stars dominate the gravitational potential.
When the cluster is dominated by cold gas, the accretion radius is given by a
tidal-lobe radius. This occurs as the cluster collapses towards a $\rho\propto
R^{-2}$ distribution. Accretion in this regime results in a mass spectrum with
an asymptotic limit of $\gamma=-3/2$ (where Salpeter is $\gamma=-2.35$). Once
the stars dominate the potential and are virialised, which occurs first in the
cluster core, the accretion radius is the Bondi-Hoyle radius. The resultant
mass spectrum has an asymptotic limit of $\gamma=-2$ with slightly steeper
slopes ($\gamma\approx-2.5$) if the stars are already mass-segr egated.
Simulations of accretion onto clusters containing 1000 stars show that as
expected, the low-mass stars accumulate the majority of their masses during the
gas dominated phase whereas the high-mass stars accumulate the majority of
their massed during the stellar dominated phase. This results in a mass
spectrum with a relatively shallow $\gamma\approx 3/2$ power-law for low-mass
stars and a steeper, power-law for high-mass stars $ -2.5\simless\gamma\le -2$.
This competitive accretion model also results in a mass segregated cluster.

Astrophysics