Efficient calculations of composite spectra for arithmetic and Reed-Muller transforms