Binomial Coefficients

I have found myself writing a program the needs getting at hand a whole range of binomial coefficients from C(0,0) to C(n,m) for some given values of n and m.

In this case the most efficient way to get them is by using the Pascal’s triangle (triangolo di Tartaglia, in Italy).

I wrote this java class that implements it, with a few optimizations to avoid storing obvious values.
Each coefficient is stored as a BigInteger.
Continue reading