def generate_bn_mat_gamma_0(n, k):
    """
    Defined in the paper eq (24)
    """
    
    if n == 0:
        return 0.5
    return (2.0 * k * (k + 1) + n * (2 * k + n + 1)) / ((2 * k + n) * (2 * k + n + 2))