We present results of computer simulations of crystal nucleation on a crystalline surface, in the Lennard-Jones model. Motivated by the pioneering work of Turnbull and Vonnegut [Ind. Eng. Chem. 44, 1292 (1952)], we investigate the effects of a mismatch between the surface lattice constant and that of the bulk nucleating crystal. We find that the nucleation rate is maximum close to, but not exactly at, zero mismatch. The offset is due to the finite size of the nucleus. In agreement with a number of experiments, we find that even for large mismatches of 10% or more, the formation of the crystal can be epitaxial, meaning that the crystals that nucleate have a fixed orientation with respect to the surface lattice. However, nucleation is not always epitaxial, and loss of epitaxy does affect how the rate varies with mismatch. The surface lattice strongly influences the nucleation rate. We show that the epitaxy observed in our simulations can be predicted using calculations of the potential energy between the surface and the first layer of the nucleating crystal, in the spirit of simple approaches such as that of Hillier and Ward [Phys. Rev. B 54, 14037 (1996)