Protein design in a lattice model of hydrophobic and polar amino acids