  Given an odd prime p, we prove a congruence on the p-residue of the Fermat
quotient q_p(a) in base a with 0<a<p, which arises from a generalization of the
Voronoi congruences and from some other congruences on sums and weighted sums
of divided Bernoulli numbers. As an application in the base 2 case, we retrieve
a congruence for the first generalized harmonic number of order (p-1)/2, a
generalization originally due to Z-H. Sun of a classical congruence known since
long for the harmonic number of order (p-1)/2 as a special case of the Lerch
formula. We find a sharpening of the Voronoi congruences which is different
from the one of W. Johnson and which is more computationally efficient. We
prove an additional related congruence, which specialized to base 2 allows to
retrieve several congruences that were originally due to E. Lehmer.
