A generalization of Riordan's formula for 3xn latin rectangles

A formula is obtained for the number of three-line latin rectangles with first row normalized and second row a permutation which, in disjoint cycle form, has no cycles of prescribed lengths.