We study the maximum function of any ℝ + -rational formal series S in two commuting variables, which assigns to every integer n ∈ ℕ, the maximum coefficient of the monomials of degree n. We show that if S is a power of any primitive rational formal series, then its maximum function is of the order Θ(n
k / 2
λ
n
) for some integer k ≥ –1 and some positive real λ. Our analysis is related to the study of limit distributions in pattern statistics. In particular, we prove a general criterion
for establishing Gaussian local limit laws for sequences of discrete positive random variables.