Structure of a proton wire in the harmonic model with allowance for the interproton interaction for the first and second neighbors