Analytical Formulae of Molecular Ion Abundances and the N2H+ Ring in Protoplanetary Disks