Here's the result for a constant f.
http://www.mathlinks.ro/Forum/viewtopic.php?t=156312
A reader supplies a proof, but I sketch a proof which uses certain
equivalence classes of mappings, in which each equivalence class has n
elements. The more general statement can be proved in an essentially
similar way -- using Mobius inversion to get a count of the aperiodic
functions on Z/nZ having values in a certain set, interpreting that
count as a coefficient of F, and noticing that the functions fall into
equivalence classes each of which has exactly n elements.
I'll write it all up in TeX when I get a bit of time, and copy it to
this group's webspace.