In this paper we focus on Dyck paths with peaks avoiding or restricted to an arbitrary set of heights. The generating functions of such types of Dyck paths can be represented by continued fractions. We also discuss a special case that requires all peak heights to either lie on or avoid a congruence class (or classes) modulo k. The case when k = 2 is especially interesting. The two sequences for this case are proved, combinatorially as well as algebraically, to be the Motzkin numbers and the Riordan numbers. We introduce the concept of shift equivalence on sequences, which in turn induces an equivalence relation on avoiding and restricted sets. Several interesting equivalence classes whose representatives are well-known sequences are given as examples.
ASJC Scopus subject areas