Exact analytic expressions for electromagnetic propagation in a finite one-dimensional periodic multilayer