Statistical Treatment of the Intramolecular Reaction between Two Functional Groups Connected by a Polymethylene Chain