  Magnetic field data provided by the Helioseismic and Magnetic Imager on board
the Solar Dynamics Observatory were utilized to explore the changes in the
magnetic energy of four active regions (ARs) during their emergence. We found
that at the very early stage of the magnetic flux emergence, an abrupt
steepening of the magnetic power spectrum takes place leading to rapid increase
of the absolute value of the negative spectra power index $\alpha$ in $E(k)$
$\sim$ $k^{\alpha}$. As the emergence proceeds, the energy increases at all
scales simultaneously implying that elements of all sizes do appear in the
photosphere. Meanwhile, the energy gain at scales larger than $\approx$10 Mm
prevails as compared to that at smaller scales. Both direct (i.e.,
fragmentation of large structures into smaller ones) and inverse (i.e., merging
of small magnetic features into larger elements) cascades are readily observed
during the emergence. However, in the case of inverse cascade, the total energy
gained at large scales exceeds the energy loss at smaller scales assuming
simultaneous appearance of large-scale magnetic entities from beneath the
photosphere. We conclude that most of the time the energy may grow at all
scales. We also cannot support the point of view regarding the dominant role of
the inverse cascade in the formation of an AR. Although the coalescence of
small magnetic elements into larger pores and sunspots is observed, our
analysis shows that the prevailed energy contribution to an AR comes from
emergence of large-scale structures.
