A recursive formulation constrained mechanical system dynamics. I: Open loop systems