fixed yet another typo in calculating Lambda_star

I always forget that when you loop over range(n), the iterator stops at
(n-1), not n.