An Introduction to Numerical Methods in C++, Revised Edition

In this chapter we briefly study three branches of mathematics in which arithmetic is conducted mostly in terms of integers: prime number factorization, rational arithmetic, and the generation of sequences of numbers which for practical purposes, and in a sense to be investigated, may be regarded as random. In the next chapter we study the extent to which such sequences come up to expectations. We begin this chapter, however, by recalling some of the well-known properties of the prime numbers, the foundations of any theory of arithmetic.
If an integer a divides the integer b with zero remainder we say that a is a divisor of b and we write a b; otherwise we write
. A prime number, or prime, is then defined as a positive integer of which the only divisors are unity and the number itself. Since unity is a divisor of all numbers it is not itself regarded as a prime number. Thus, the first few primes are:
The fundamental theorem of arithmetic, the earliest proof of which is attributed to Euclid, asserts that any integer may be represented as the product of a sequence of primes, and that apart from the order in which they occur the product is unique. A number which is not itself prime is said to be composite. Thus, for example, 31 050 = 2.3 3.5 2.23, and in general n = p 1 k