Let X be a Noetherian space, let Φ : X −→ X be a continuous function, let Y ⊆ X be a closed set, and let x ∈ X. We show that the set S := {n ∈ N : Φ n (x) ∈ Y } is a union of at most finitely many arithmetic progressions along with a set of Banach density zero. In particular, we obtain that given any quasi-projective variety X, any rational map Φ : X −→ X, any subvariety Y ⊆ X, and any point x ∈ X whose orbit under Φ is in the domain of definition for Φ, the set S is a finite union of arithmetic progressions together with a set of Banach density zero. This answers a question posed by Laurent Denis [7]. We prove a similar result for the backward orbit of a point and provide some quantitative bounds.