The statistics of wavefunctions in the one-dimensional (1d) Anderson model of localization is considered. It is shown that at any energy that corresponds to a rational filling factor f=p/q there is a statistical anomaly which is seen in expansion of the generating function (GF) to the order (q-2) in the disorder parameter. We study in detail the principle anomaly at \(f=1/2\) that appears in the leading order. The transfer-matrix equation of the Fokker-Planck type with a two-dimensional internal space is derived for GF. It is shown that the zero-mode variant of this equation is integrable and a solution for the generating function is found in the thermodynamic limit.