We study the Hilbert–Kunz
invariants of homogeneous ideals in graded polynomial algebras and develop a
homological formula for the Hilbert–Kunz multiplicity resembling the formula of
J.-P. Serre using Koszul homology for the ordinary multiplicity of an ideal.
We apply this in the special case of maximal primary irreducible ideals to
obtain several new results, among which is a reciprocity formula for the
Hilbert–Kunz invariants of directly linked ideals in a graded polynomial
algebra.