  The differential cross sections for inclusive neutral pions as a function of
transverse and longitudinal momentum in the very forward rapidity region have
been measured at the Large Hadron Collider (LHC) with the Large Hadron Collider
forward detector (LHCf) in proton-proton collisions at $\sqrt{s}=$ 2.76 and 7
TeV and in proton-lead collisions at nucleon-nucleon center-of-mass energies of
$\sqrt{s_\text{NN}}=$ 5.02 TeV. Such differential cross sections in
proton-proton collisions are compatible with the hypotheses of limiting
fragmentation and Feynman scaling. Comparing proton-proton with proton-lead
collisions, we find a sizable suppression of the production of neutral pions in
the differential cross sections after subtraction of ultra-peripheral
proton-lead collisions. This suppression corresponds to the nuclear
modification factor value of about 0.1-0.3. The experimental measurements
presented in this paper provide a benchmark for the hadronic interaction Monte
Carlo simulation codes that are used for the simulation of cosmic ray air
showers.
