Recursive code for B-coefficients