where
and
are partition functions, with giving the number of ways of writing as a sum of terms, is the nearest integer
function, and
is the floor function (Jordan et al. 1979,
Andrews 1979, Honsberger 1985). Strangely enough, for , 4, ... is precisely Alcuin's sequence.

Andrews, G. "A Note on Partitions and Triangles with Integer Sides." Amer. Math. Monthly86, 477, 1979.Honsberger,
R. Mathematical
Gems III. Washington, DC: Math. Assoc. Amer., pp. 39-47, 1985.Jordan,
J. H.; Walch, R.; and Wisner, R. J. "Triangles with Integer Sides."
Amer. Math. Monthly86, 686-689, 1979.Sloane, N. J. A.
Sequence A005044/M0146 in "The On-Line
Encyclopedia of Integer Sequences."