  CCD vby Stroemgren photometry of a statistically complete sample of red
giants and stars in the main sequence turn-off region in omega Centauri has
been used to analyse the apparently complex star formation history of this
cluster. From the location of stars in the (b-y),m_1 diagram metallicities have
been determined. These have been used to estimate ages of different
sub-populations in the color-magnitude diagram. The metal-poor population
around -1.7 dex is the oldest population found. More metal-rich stars between
[Fe/H]=-1.5 and -1.0 dex tend to be 1-3 Gyr younger. These stars are more
concentrated towards the center than the metal-poor ones. The most-metal rich
stars (-0.7 dex) might be up to 6 Gyr younger than the oldest population. They
are asymmetrically distributed around the center with an excess of stars
towards the South. We argue that the Stroemgren metallicity in terms of element
abundances has another meaning than in other globular clusters. From a
comparison with spectroscopic element abundances, we find the best correlation
with the sum C+N. The high Stroemgren metallicities, if interpreted by strong
CN-bands, result from progressively higher N and perhaps C abundances in
comparison to iron. We see an enrichment already among the metal-poor
population, which is difficult to explain by self-enrichment alone. An
attractive speculation is that omega Cen was the nucleus of a dwarf galaxy. We
propose a scenario in which omega Cen experienced mass inflow over a long
period of time, until the gas content of its host galaxy was so low that star
formation in omega Cen stopped, or alternatively the gas was stripped off
during its infall in the Milky Way potential. A mass inflow occuringcn a clumpy
and discontinuous manner could explain several of our findings.
