Exact solution of the Ising model on a pentagonal lattice