This book is a genetic introduciton to algebraic number theory which follows the development of the subject in the work of Fermat, Kummer and others, motivating new ideas and techniques by explaining the problems which led to their creation. The central problem is the one indicated in the title, but many other basic questions of algebraic number thoery are also treated.