Diophantine equations of Pellian type