We investigate the time evolution of the mass distribution of pre-stellar cores (PSCs) and their transition to the initial stellar mass function (IMF) in the central parts of a molecular cloud (MC) under the assumption that the coalescence of cores is important. Our aim is to explain the observed shallow IMF in dense stellar clusters such as the Arches cluster. The initial distributions of PSCs at various distances from the MC center are those of gravitationally unstable cores resulting from the gravo-turbulent fragmentation of the MC. As time evolves, there is a competition between the PSCs rates of coalescence and collapse. Whenever the local rate of collapse is larger than the rate of coalescence in a given mass bin, cores are collapsed into stars. With appropriate parameters, we find that the coalescence-collapse model reproduces very well all the observed characteristics of the Arches stellar cluster IMF; Namely, the slopes at high and low mass ends and the peculiar bump observed at ~5-6 M_sol. Our results suggest that todays IMF of the Arches cluster is very similar to the primordial one and is prior to the dynamical effects of mass segregation becoming important