Add R2 and correct T2.

This requires extending doodson numbers with 2 columns for dependency on
N and p' because of R2 and T2's dependence on p'.