On the solution of a Riesz equilibrium problem and integral identities for special functions