sum from 1 to infinity of p(1-p)^(3k-1)