2  Prime Number Sequence Generation.

2.1  Preamble, Amendment of the Control Criteria and Further Categorisation.

In [1], quadratics generating prime number sequences were categorised into four groups:

(i) Full Prime - Equations that generated a sequence of primes starting with a0 and of at least (a0 -1) in number, (minimum 4).

(ii) Sub-Prime - Equations that generated a sequence of primes starting with a0 and of at least 4 in number.

(iii) Symmetrical V-Prime - Equations that generate two sequences of primes, the first descending from a maximum to a minimum term, and the second increasing from the same minimum to the same maximum.

(iv) Unsymmetrical V-Prime - Equations similar to (iii) but generating arms of different lengths.

In this paper the last two types are not further considered because they are all convertible to either of the first two types by the reduction process described in [1] and this paper.

The number of equations now produced, both Full Prime, 357, and Sub-Prime, 94, is such that the control criteria can be tightened. Thus the minimum permissible is now increased from four to five. This change reduces the number of acceptable quadratics found to 222, Full Prime, and 59, Sub-Prime, within which the 104 generating all the primes from 0 to 1500 plus 190 others is contained. There is only one exception to this change which must be accepted. There is only one equation that generates the prime number 3 in any acceptable sequence. That quadratic is


N = x2 + x + 1
(2.1)

Eq.(2.1) generates 1, 3, 7 and 13 for x = 0 to 3 and fails at N = 21 for x = 4. (Equations with a0 = 3 can only generate a sequence of 3 primes).

The remaining Full and Sub-Prime quadratics making up the compliment of acceptable equations can now be further categorised into three sub-groups as follows.


(i) Type (a) - Equations of the form:


N = a2 x2 + a0
(2.2)

Full Prime equations of this class generate a continuous sequence of primes, the quantity of which is equal to the value of a0. Legendre's equation is one such.


(ii) Type (b) - Equations of the form:


N = a2 x2 + a2 x + a0
(2.3)

Full Prime equations of this class generate a continuous sequence of primes, the quantity of which is equal to the value of (a0 - 1), except when a2 = 6, when the quantity is equal to (a2 - 2). Euler's equation is of this type.


(iii) Type (c) - Equations of the form:

N = a2 x2 + a1 x + a0
(2.4)

Full Prime equations of this class generate a continuous sequence of primes, the quantity of which is equal to the value of a0.

Note that in the above three classes, when a0 = 1, the number of primes generated must be equal to or greater than five.

It is not possible to list all the equations found in the text of this paper, and so they are contained, together with all their characteristics, in one of the spreadsheets associated with the paper, and described in Section 3.0.

2.2  The Composite Search Method.

The manner in which this method works is to evaluate whether any of the composite numbers lying within the range of the quadratic under evaluation, are generated by that quadratic. Consider the full prime equation of (2.2). Assume that this quadratic generates a composite number when x = a0-n. Substituting in (2.2)


N = a2 ( a0 - n )2 + a0
(2.5)

Expanding and re-arranging gives


N - ( a2 a0 + 1 )  a0


a2
= n2 - 2na0
(2.6)

Completing the square and re-arranging for n gives


n = - æ
è
N - a0

a2
ö
ø
1/2

 
+ a0
(2.7)

So that if n is less than or equal to the set criteria, the quadratic under evaluation is acceptable. Equivalent algorithms for Type (b) and Type (c) equations are as follows.

For Type (b)


n = - æ
è
N - a0 + a2 /4


a2
ö
ø
1/2

 
+ a0 + 1

2
(2.8)

and for Type (c)


n = - æ
è
N - a0


a2

a12


4a22

ö
ø
1/2

 
+ a0 + a1

2a2
(2.9)

In the above three algorithms, by replacing N by pq, where p and q are odd integers generating all the composites within the applicable range of the quadratic under evaluation, n can be evaluated. When n is integer, the quadratic under evaluation then generates the composite represented by the product pq. The equation then passes or fails according to whether n meets the criteria associated with (2.2) to (2.4) above.

2.3  The Re-Configurable Ulam's Spiral Method.

Ulam's Spiral, discovered by Stanislav Ulam in 1963, is a visual means of identifying quadratic equations that generate prime number sequences, and is very well documented in the mathematical literature. In its basic form it generates quadratics of the form


4x2 + a1 x + a0
(2.10)

The value of a0 is that number at the heart of the spiral, (the Base Number), while the value of a1 depends upon the direction in which the terms of the equation line up, viz, Fig. 2.1 below.

Fig. 2.1 - The Basic Ulam Spiral.


The value of a1 in (2.10), according to the direction A to H, is shown in the following table.

Directiona1
A- 3
B- 2
C- 1
D0
E1
F2
G3
H4


Table 2.1 - Value of a1 in Ulam's Spiral.

Thus it is clear from the above that, the terms of Type (a) equations always lie in direction D, and those of Type (b) in direction H. All other directions produce Type (c) equations.

Now, the characteristics of (2.10) and Table 2.1 only apply when the Step Size in the cells of the spiral is unity, as shown in Fig. 2.1. For the spiral to show the terms of an acceptable quadratic in which a2 differs from the value 4, it is necesary to vary this Step Size. For instance, if, in Fig. 2.1, the value of a0 is made equal to 41, then Euler's equation, Type (b), lines up along directions B and F as alternating terms either side of the Base Number. Changing the Step Size to 0.25, and re-configuring the spiral, then lines up the terms of Euler's equation along direction H. Thus the Step Size can be made any size desired, integer or fractional, which will subsequently allow for the identification of quadratics with values of a2 and a1 different from those in (2.10) and Table 2.1.

Also, it is clear from the above that to portray a Full Prime equation on the spiral, the first term must appear as the Base Number, (except when a0 is unity). If the first term appears in any other location, a Sub-Prime quadratic is produced. Another very important feature of the spiral is that it is not only the above eight directions of terms that produce quadratic equations, directions as shown in the following figure do also.


Fig. 2.2 - Acceptable Term Spacing in Ulam's Spiral.

There are essentially only two specific requirements for the terms in Ulam's Spiral to generate a quadratic, (prime generating or otherwise), They are


(i) The term values must be such that in Fig. 2.2,  a < b < c < d.

(ii) Each term must cross at least one spiral boundary, and the number of boundaries crossed for each term must be the same. These boundaries are highlighted in Fig. 2.2.

An analytical evaluation of Ulam's Spiral, as extended in this paper, is presented in Appendix A.



M6 Version 1.0.0
Ó P.G.Bass, December 2011

On to the Next Section:- Computerisation

Back to the Introduction to this Paper:- Prime Number Quadratic Generation

Back to the Home Page for this Site:- Home