Recursive evaluation of indefinite integrals involving associated Legendre functions and Gegenbauer polynomials