Recurrence relations for generalized hitting times for semi-Markov processes