AN INVESTIGATION OF THE SET OF ANS NUMBERS

Norman E. Elliott and Dan Richner

The investigation of properties of the integers can lead to fascinating and challenging questions. This is what makes the branch of mathematics known as “number theory” the so–called “playground of mathematicians.” In fact, some of the simplest sounding and accessible ideas concerning the integers can result in such questions. Here, we will introduce and discuss one such idea. All undefined terminology and notation is that of [2] and its later editions.

\underline{Definition}. A positive integer is called an ans number if it can be expressed as the difference of squares of two prime integers.

Thus, 40 and 45 are ans numbers since

40 = 7^{2} − 3^{2} and 45 = 7^{2} − 2^{2}.

On the other hand, 44 is not ans since it cannot be expressed as the difference of squares of two primes. A procedure to determine whether or not a particular positive integer is ans can be developed.

Noting that in order to show that a positive integer, n, is ans, we must find two primes p, q, such that

p + q = a, p − q = b, and n = ab.

Hence, we see that

p = \frac{(a + b)}{2} and q = \frac{(a − b)}{2}.

Therefore, we can state the following theorem.

\underline{Theorem 1}. The positive integer n is ans if and only if there exist two integers a, b such that

n = ab

and

\frac{(a + b)}{2} and \frac{(a − b)}{2}

are primes.

Investigating further, we see that if gcd(a, b) = 1, then q = 2 while if gcd(a, b) = 2, then q is an odd prime. It is also clear that all odd ans numbers are of the form

p^{2} − 2^{2}

with p an odd prime. Since for any odd prime p, it follows that

p^{2} ≡ 1 (mod 8),

we have the following theorem.

\underline{Theorem 2}. If n is an even ans number, then

n ≡ 0 (mod 8).

Note that Theorem 2 implies that 44 is not an ans number. Further inspection gives Theorem 3.

\underline{Theorem 3}. Let n > 5 be ans with representation

n = p^{2} − q^{2}.

Then,

1. q = 2 → n ≡ 0 (mod 3) and n is odd,

2. q = 3 → n ≡ 0 (mod 4) and 3 is not a factor of n, and

3. q ≥ 5 → n ≡ 0 (mod 24).

Using the above theorems and observations we can, in a systematic way, determine whether or not a given positive integer is ans. Note that property 3 given in Theorem 3 can be found as a problem in [1].

\underline{Example 1}. Since all odd ans numbers are of the form p^{2} − 4, it is clear that 25 is not ans since 29 is not a square of a prime.

\underline{Example 2}. Since 40 is even and not divisible by 24, then in order for 40 to be ans, there must be a prime p such that

p^{2} − 3^{2} = 40.

Since p = 7 is a prime solution to the above, we have that 40 is indeed ans.

\underline{Example 3}. Consider the integer 120. Since 120 is divisible by 24, by Theorem 3, in order for 120 to be ans, the desired representation for 120 would have to be

120 = p^{2} − q^{2}

with q ≥ 5. Thus, we appeal to Theorem 1, and the observation following it. That is, we have to search for integers a, b such that

gcd(a, b) = 2, 120 = ab

with

\frac{(a + b)}{2}, \frac{(a − b)}{2}

primes. Since

120 = (2^{3})(3)(5)

it follows that only the possibilities

a = 2; b = (2^{2})(3)(5)
a = (2)(3); b = (2^{2})(5)
a = (2)(3)(5); b = 2^{2}
a = (2)(5); b = (2^{2})(3)

need be considered. (We chose a > b.)

After dividing each a and b in the above by 2, we then inspect each of the sums

1 + (2)(3)(5) = 31
3 + (2)(5) = 13
(3)(5) + 2 = 17
5 + (2)(3) = 11

and their corresponding differences

\begin{aligned}(2)(3)(5) − 1 & = 29 \\ (2)(5) − 3 & = 7 \\ (3)(5) − 2 & = 13 \\ (2)(3) − 5 & = 1. \end{aligned}

Here we obtain

a = 31; b = 29, a = 13; b = 7, and a = 17; b = 13,

which are the only possibilities. That is,

120 = 31^{2} − 29^{2}, 120 = 13^{2} − 7^{2} and 120 = 17^{2} − 13^{2}

are represenations for 120. Hence, 120 is indeed ans.

Letting ω(n) represent the number of distinct prime factors of n, we see that the number of cases that need be considered would be

2^{(ω(n)−1)}

and so for ω(n) large, the above procedure could be a long one. This presents us with the challenge of finding a more efficient test for ansality.

Many questions can be put forward concerning ans numbers. Some examples of such questions are:

1. What is the natural density of the set of ans numbers?

2. What ans numbers are powers of a prime?

3. What ans numbers are the product of two distinct primes?

4. What ans numbers are of the form, p^{2} − 1 where p is a prime? Let A be a set of positive integers. Recall that for a real number x, we define

A(x) = #{a ∈ A : a ≤ x}

and

natural density of A = lim \frac{A(x)}{x}

if this limit exists. Thus, for example, if E is the set of positive even integers, we have

natural density of E = lim \frac{E(x)}{x}

and if P is the set of prime numbers,

natural density of P = lim \frac{P (x)}{x}.

Since the density of the set of prime numbers is 0, it follows that

density{p^{2} − 2^{2} : p ∈ P } = 0

and

density{p^{2} − 3^{2} : p ∈ P } = 0.

Therefore, because 24 is a factor of all other ans numbers, we have that the density of the set of ans numbers if ≤ 1/24. Even though it seems clear that the natural density of the ans numbers would have to be 0, no rigorous proof has yet been found.

It is clear that the only prime ans is 5 since

r = p^{2} − q^{2} = (p + q)(p − q)

where p, q, r are primes can only occur when

p + q = r and p − q = 1

and so,

p = 3 and q = 2.

Hence, r = 5.

But can a higher power of a prime be ans? Suppose that p, q, and r are primes such that

p^{2} − q^{2} = r^{n}

for a positive integer, n. We investigate two cases: r = 2 and r ≠ 2. If r = 2, then q is an odd prime. Note that q ≥ 5 since 8 is not an ans number and also that 24 is not a factor of 2^{n}. We must have then that q = 3. Hence, we need only consider the possibility

p^{2} − 9 = 2^{n}.

Thus,

p + 3 = 2^{a} and p − 3 = 2^{b}

for a > b ≥ 1.

It can be easily shown that for an odd prime, p,

4 | − p − 3 or 4 | − p + 3,

so it is not possible for b ≥ 2 and it follows that b = 1. That is, p = 5 and a = 3. Therefore,

n = a + b = 4.

We can state this as 2^{n} is ans if and only if n = 4. (i.e. 16 is the only ans number that is a power of 2.)

If, on the other hand, r is an odd prime then q = 2 and we have that

p^{2} − 4 = (p + 2)(p − 2) = r^{n}.

Thus,

p + 2 = r^{a} and p − 2 = r^{b}

which a > b ≥ 0. Since p is odd, it follows that

gcd(p + 2, p − 2) = 1,

so we must have that b = 0. That is, p = 3, q = 2, r = 5, and n = 1. We have shown that for an odd prime r, r^{n} is ans if and only if r = 5 and n = 1. (i.e. 5 is the only power of an odd prime that is ans.) The above results are stated in the following theorem.

\underline{Theorem 4}. The only prime power ans numbers are 5 and 16.

A similar result is stated in Theorem 5.

\underline{Theorem 5}. The only normal number that is the product of two distinct primes is 21.

\underline{Proof}. Let p, q, r, s be primes such that
p^{2} − q^{2} = rs

with r and s odd. (Note that neither can be 2 since every even ans number is divisible by 8.) Without loss of generality, assume that r > s. Since rs is odd, we must have that q = 2. Thus, we consider the possibility

p^{2} − 2^{2} = (p + 2)(p − 2) = rs.

Since r > s, we must have that

p + 2 = r and p − 2 = s,

and so s < p < r is a prime triple. Since 3, 5, 7 is the only prime triple, it follows that rs = 21. (i.e. The only ans number that is the product of two distinct primes is 21.)

Since it is clear that there are examples of ans numbers that are products of 3 distinct primes, 4 distinct primes, etc., Theorem 5 is all we can expect with respect to products of distinct primes.

Question 4 becomes somewhat more interesting. An ans number of the form p^{2} − 1 is called a special ans number. Since

47^{2} − 1 and 383^{2} − 1

are not ans, it is clear that not all numbers of the form p^{2} − 1, with p a prime, are ans. A characterization of all special ans numbers has not yet been found. However, it is instructive to consider the occurrence of special ans numbers in the “ans triangle.” This triangle is actually a table whose column and row headings are the primes and whose entry in the nth row and mth column is the ans number

(the mth prime)^{2} - (the nth prime)^{2}.

Note the main diagonal is composed with zeros and that no entries would occur below the main diagonal since ans numbers are defined as positive integers. Hence, the table appears as a “triangle.”

For example, a partial ans triangle is

2  3  5  7  11 13 17 19 23 29 31 37…
2  0  5  21 45 117 165 285 357 525 837 957 1365
3  0  16 40 112 160 280 352 520 832 952 1360
5  0  24 96 144 264 336 504 816 936 1344
7  0  72 120 240 …
. . . . . . . . .

This table shows most of the previously mentioned properties of ans numbers. For example,

1. the odd ans numbers make up the first rows and each (except for 5) is divisible by 3.

2. those ans’s which are relatively prime to 3 make up the second row. Each is divisible by 8, but not 24.

3. if n(a, b) denotes the entry in the ath row and the bth column, we see that

n(a + 1, b + 1) = n(a, b + 1) − n(a, b) + n(a + 1, b).

Thus, the construction of the column corresponding to the nth prime p, can be accomplished by commencing with p^{2} − 4 and using the column corresponding to the (n − 1)st prime together with the above recursion relation.

This “triangle” can be studied to facilitate investigating particular questions concerning ans numbers. For example, the placement of special ans numbers in the triangle is of interest. Inspection of the triangle shows that the columns contain

0, 0, 1, 0, 2, 2, 0, 2, 0, 2, 2, 1, 2, 6, 2, 0, …

special ans numbers, respectively. It would appear that special ans numbers are not too numerous and occur somewhat irregularly with respect to the number per column.

In order to investigate the occurrence of special ans numbers in the columns of the triangle, for an odd prime p, we define

N_{p} = {p^{2} − q^{2} : 2 ≤ q < p with q a prime}.

Thus, N_{p} is the members of the column of the triangle corresponding to the prime p. If s is a special ans number and

s ∈ N_{p}, then there are primes q and r such that

p^{2} − q^{2} = r^{2} − 1.

Note that r < p and so,

p^{2} − r^{2} ∈ N_{p} and p^{2} − r^{2} = q^{2} − 1.

Thus, p^{2} − r^{2} is special. We see that two cases are possible.

1. p = 2

2. p ≠ q. The following lemma will help to facilitate our investigation.

\underline{Lemma}. N_{p} contains, at most, one instance of the case r = q.

\underline{Proof}. Suppose there exist primes r, r_{1} such that

p^{2} − r^{2} = r^{2} − 1 and p^{2} − r_{1}^{2} = r_{1}^{2} − 1.

Then, r = r_{1} and we see that if case 1 holds, then at most one member of N_{p} can be special.

It follows that the number of special ans numbers in N_{p} is even if case 1 nevers holds, and odd if there exist a prime r, such that

p^{2} − r^{2} = r^{2} − 1.

Recall that the Fermat–Pellican equation

x^{2} − y^{2} = ±1

has solutions defined by the recursive formulas

\begin{aligned}x_{k} & = 2x_{k−1} + x_{k−2} \\ y_{k} & = 2y_{k−1} + y_{k−2} \end{aligned}

with

x_{0} = 1; y_{0} = 0
x_{1} = 1; y_{1} = 1.

In fact, even k generates the solutions for

x^{2} − y^{2} = 1

and odd k generates the solutions for

x^{2} − y^{2} = −1.

Hence, we have the following theorem.

\underline{Theorem 6}. N_{p} contains an odd number of special ans numbers when and only when the Fermat–Pellian equation

x^{2} − y^{2} = −1

has solutions x = p, y = q with p and q prime. Otherwise N_{p} contains an even number of special ans numbers.

Thus, for example, Theorem 6 implies that N_{7} and N_{41} contains an odd number of special ans numbers. Note that since each of the sequences

{x_{k}}; {y_{k}}

are strictly increasing for k ≥ 1, it follows that the above lemma is again verified.

In conclusion, some open questions and problems are presented. Hopefully, these questions will encourage you to further investigate the set of ans numbers.

1. Conjecture: The set of ans numbers has natural density zero.

2. What is the next prime p such that N_{p} has an odd number of special ans numbers. Can such primes p be characterized in a more efficient manner than Theorem 6?

3. Noting that N_{11}, N_{19}, N_{29}, and N_{59} each contain no special ans numbers, can a characterization for primes p be found so that N_{p} contains no special ans numbers?

4. What is the natural density of the set of special ans numbers relative to the

set

{p^{2} − 1 : p is a prime}?

5. Investigate the properties of a triangle generated in the same manner as the ans triangle, but using a sequence other than the primes. Perhaps using a sequence whose members are pairwise relatively prime.

\underline{References}

1. U. Dudley, Elementary Number Theory W. H. Freeman & Co., San Francisco, 1969.

2. I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers, 4th ed., John Wiley & Sons, New York, 1980.

Norman E. Elliott (student) Department of Mathematics Central Missouri State University Warrensburg, MO 64093 email: mathtigre@hotmail.com

Dan Richner Department of Mathematics Warrensburg High School Warrensburg, MO 64093