Let t τ be a solution to the equation θ (t) = (τ − 1) π , τ > 0 , where θ (t) is the increment of the argument of the function π − s / 2 Γ (s / 2) along the segment connecting points s = 1 / 2 and s = 1 / 2 + i t . t τ is called the Gram function. In the paper, we consider the approximation of collections of analytic functions by shifts of the Riemann zeta-function (ζ (s + i t τ α 1) , ... , ζ (s + i t τ α r)) , where α 1 , ... , α r are different positive numbers, in the interval [ T , T + H ] with H = o (T) , T → ∞ , and obtain the positivity of the density of the set of such shifts. Moreover, a similar result is obtained for shifts of a certain absolutely convergent Dirichlet series connected to ζ (s) . Finally, an example of the approximation of analytic functions by a composition of the above shifts is given. [ABSTRACT FROM AUTHOR]