In this paper, we present an order-recursive formula for the pseudoinverse of a matrix. It is a variant of the well-known Greville [SIAM Rev., 2 (1960), pp. 578--619] formula. Three forms of the proposed formula are presented for three different matrix structures. Compared with the original Greville formula, the proposed formulas have certain merits. For example, they reduce the storage requirements at each recursion by almost half; they are more convenient for deriving recursive solutions for optimization problems involving pseudoinverses. Regarding applications, using the new formulas, we derive recursive least squares (RLS) procedures which coincide exactly with the batch LS solutions to the problems of the unconstrained LS, weighted LS, and LS with linear equality constraints, respectively, including their simple and exact initializations. Compared with previous results, e.g., Albert and Sittler [J. Soc. Indust. Appl. Math. Ser. A Control, 3 (1965), pp. 384--417], our derivation of the explicit recursive formulas is much easier, and the recursions take a much simpler form. New findings include that the linear equality constrained LS and the unconstrained LS can have an identical recursion---their only difference is the initial conditions. In addition, some robustness issues, in particular, during the exact initialization of the RLS are studied.