binomial with memorization 1.1.27