(Abridged) We present a detailed analysis of week-long simultaneous observations of the blazar Mrk421 at 2-60 keV X-rays (RXTE) and TeV gamma-rays (Whipple and HEGRA) in 2001. The unprecedented quality of this dataset enables us to establish firmly the existence of the correlation between the TeV and X-ray luminosities, and to start unveiling some of its more detailed characteristics, in particular its energy dependence, and time variability. The source shows strong, highly correlated variations in X-ray and gamma-ray. No evidence of X-ray/gamma-ray interband lag is found on the full week dataset (<3 ks). However, a detailed analysis of the March 19 flare reveals that data are not consistent with the peak of the outburst in the 2-4 keV X-ray and TeV band being simultaneous. We estimate a 2.1+/-0.7 ks TeV lag. The amplitudes of the X-ray and gamma-ray variations are also highly correlated, and the TeV luminosity increases more than linearly w.r.t. the X-ray one. The strong correlation supports the standard model in which a unique electrons population produces the X-rays by synchrotron radiation and the gamma-ray component by inverse Compton scattering. However, for the individual best observed flares the gamma-ray flux scales approximately quadratically w.r.t. the X-ray flux, posing a serious challenge to emission models for TeV blazars. Rather special conditions and/or fine tuning of the temporal evolution of the physical parameters of the emission region are required in order to reproduce the quadratic correlation.