We study the effects that initial conditions of star clusters and their massive star population have on dynamical ejections of massive stars from star clusters up to an age of 3 Myr . We use a large set of direct N -body calculations for moderately massive star clusters ( M _ { \mathrm { ecl } } \approx 10 ^ { 3.5 } M _ { \sun } ) . We vary the initial conditions of the calculations , such as the initial half-mass radius of the clusters , initial binary populations for massive stars and initial mass segregation . We find that the initial density is the most influential parameter for the ejection fraction of the massive systems . The clusters with an initial half-mass radius r _ { \mathrm { h } } { \left ( 0 \right ) } of 0.1 ( 0.3 ) pc can eject up to 50 % ( 30 % ) of their O-star systems on average , while initially larger ( r _ { \mathrm { h } } { \left ( 0 \right ) } = 0.8 pc ) clusters , that is , lower density clusters , eject hardly any OB stars ( at most { \approx } 4.5 % ) . When the binaries are composed of two stars of similar mass , the ejections are most effective . Most of the models show that the average ejection fraction decreases with decreasing stellar mass . For clusters that are efficient at ejecting O stars , the mass function of the ejected stars is top-heavy compared to the given initial mass function ( IMF ) , while the mass function of stars that remain in the cluster becomes slightly steeper ( top-light ) than the IMF . The top-light mass functions of stars in 3 Myr old clusters in our N -body models agree well with the mean mass function of young intermediate-mass clusters in M31 , as reported previously . This implies that the IMF of the observed young clusters is the canonical IMF . We show that the multiplicity fraction of the ejected massive stars can be as high as { \approx } 60 % , that massive high-order multiple systems can be dynamically ejected , and that high-order multiples become common especially in the cluster . We also discuss binary populations of the ejected massive systems . Clusters that are initially not mass-segregated begin ejecting massive stars after a time delay that is caused by mass segregation . When a large kinematic survey of massive field stars becomes available , for instance through Gaia , our results may be used to constrain the birth configuration of massive stars in star clusters . The results presented here , however , already show that the birth mass-ratio distribution for O-star primaries must be near uniform for mass ratios q \gtrsim 0.1 .