We study the structure factor for a large class of sequences of two elements a and b such that longer sequences are generated from shorter ones by a simple substitution rule a→σ1(a, b) and b→σ2(a, b), where the σ's are some sequences of a's and b's. Such sequences include periodic and quasiperiodic systems (e.g., the Fibonacci sequence), as well as systems such as the Thue-Morse sequence, which are neither. We show that there are values of the frequency ω at which the structure factors of these sequences have peaks that scale with L, the size of the system like Lα(ω). For a given sequence a simple one- or two-dimensional dynamical iterative map of the variable ω can easily be abstracted from the substitution algorithm. The basin of attraction of a given fixed point or limit cycle of this map is a set of values of ω at which there are peaks of the structure factor all of which share the same value of α. Furthermore, only those values of ω which are in the basin of attraction of the origin can have α(ω)=2. All other peaks will grow less rapidly with L. We show how to construct many sequences which, like the Thue-Morse sequence, have no L2 peaks. Other qualitative features of the structure factors are presented. Our approach unifies the treatment of a large class of apparently very diverse systems. Implications for the band structure of these systems as well as for the analysis of sequences with more than two elements are discussed. © 1990 Plenum Publishing Corporation.