APPENDIX B.

Examples of Lining Up Sequence Terms in the Spiral.

There are two methods to achieve this, the iterative cell count method, and a semi-analytical method based upon the results of Appendix A. The second method is superior in that it reveals all conditions under which the terms of any particular quadratic will line up in the spiral. Either process can also show how this exercise can reveal additional prime generating quadratics.

B.1 The Iterative Cell Count Method

After maximisation of a quadratic, take the first four primes as generated from "Numbers Generated" on PrimeGen.xls, and enter them into the "Special Search Numbers" on Ulam.xls and "Re-Configure Primes". There are two possible outcomes.

(i) The four primes in question will curl to the right in the spiral. In most cases lining up the complete sequence is merely a matter of inserting the smallest of the four primes in the "Base Number Input" cell and reconfiguring primes. However, where this still results in a curl to the right, it is necessary to count the smallest numbers of cells to individually move each prime number to a cell adjacent to the next largest. Cells must be counted clockwise and from a large number to a smaller. Add these counts, multiply by the "Step Size" and add the result to the existing "Base Number" to produce a new Base Number. Insert this into "Base Number Input" and reconfigure primes. The sequence should then line up somewhere in the spiral. In some cases it may be necessary to repeat this process a number of times.

(ii) The four numbers in question will curl to the left. In this case the same process as in (i) should be followed but counting anti-clockwise from smaller numbers to larger.

This procedure is illustrated in the following examples.

B.1.1 - Reduced Equation Curling Clockwise.

This example shows how to line up reduced equations curling clockwise in the spiral, and also how this process can reveal additional prime generating quadratics.


(i) In Ulam.xls, set the Base Number to 1, and the Step Size to 1.5. Press the "Reconfigure Primes" button.

(ii) Select the sequence of primes, 109, 163, 229, 307 etc. and insert these numbers into the cells "Terms Numbers Input from Spiral".

(iii) This yields the quadratic


N = 6x2 + 48x + 109
(B.1)

in the "Equation Coefficient" cells.

(iv) Insert the coefficients of (B.1) into the "Equation to be Reduced" cells of PrimeGen.xls, and vary the prime number in the cell marked "P" to find the lowest value which gives integer values in the "N+" and "N-" cells. The lowest value is 13 to give in the N+ cells


N = 6x2 + 13
(B.2)

as the reduced equation.

(v) Insert the coefficients of (B.2) into the "Coefficient Input" cells, (a1 = 0). The sum of the coefficients is a prime number and the original four primes in (ii) are generated, preceded by the additional primes 13, 19, 37 and 67, and there are no composites present in this sequence. The reduced equation is therefore acceptable.

(vi) Insert the first four primes in (v) in the "Special Number Search" cells in Ulam.xls and reconfigure primes. These four primes will be highlighted curling to the right in the spiral.

(vii) Insert the lowest prime, 13, into the "Base Number Input" cell and reconfigure primes to yield 13 consecutive primes lying in direction D, showing that (B.2) is a Type (a) Full Prime quadratic.

Now note that the reconfigured spiral also yields another sequence of primes starting with 211 lying on the RHS of the spiral parallel to direction H. Taking the first four and proceeding as in (ii) and (iii) above yields


N = 6x2 + 66x + 211
(B.3)

reducing this quadratic as in (iv) above yields


N = 6x2 + 6x + 31
(B.4)


and which via (v) above produces the original four primes preceded by 31, 43, 67, 103 and 151. Processing the first four of these as in (vi) above again results in their curling clockwise in the reconfigured spiral. Thus inserting 31 as the Base Number, reconfiguring primes yields a long sequence of consecutive primes lying along direction H and extending beyond the periphery of the spiral. Checking the generated terms in PrimeGen.xls proves (B.4) to be a Type (b) Full Prime quadratic generating 29 primes starting with 31 and ending with 4903.

B.1.2 - Reduced Equation Curling Anti-Clockwise.

Example 1 - Integer and Negative Values.

In Ulam.xls set the Base Number to -29 and the Step Size to 3. Select the sequence of primes 271, 409, 571 and 757 to produce


N = 12x2 + 126x + 271
(B.5)

Reducing (B.5) gives


12x2 + 54x + 1
(B.6)


which generates the above four primes preceded by 1, 67 and 157. When, with 271, these are reconfigured in the spiral, they curl anticlockwise. To line up the complete sequence, the minimum number of cell moves to bring each prime adjacent to the next largest is 2 each. Totalled this is 6, which when multiplied by the Step Size is 18. Subtract this from the existing Base Number, (-29) to give -47 and insert this as the new Base Number. The whole sequence of 12 primes now lines up parallel to direction F, Full Prime Type (c).

Example 2 - Fractional Values.

In Ulam.xls set the Base Number to 1 and the Step Size to 3.75. Select the sequence of primes 271, 421, 601 and 811 etc. to produce


N = 15x2 + 135x + 271
(B.7)

Reduced this becomes


N = 15x2 + 45x + 1
(B.8)


which produces the above four primes preceded by 1, 61 and 151. Together with 271 when reconfigured in the spiral they curl anti-clockwise. The total count to bring all four numbers adjacent is 6, multiplied by the Step Size is 22.5. Subtracted from the existing Base Number gives -21.5 as the new Base Number, resulting in 12 consecutive primes lying parallel to direction H, Full Prime, Type (c).

B.2 The Semi-Analytic Method.

This method is best described by example. Thus consider the second example in B.1.1 above, i.e. (B.4).

First substitute (A.1) into (A.2) for k to get


( 8Rn + D ) = 4 a1

a2
B
(B.9)

Inserting the coefficients of (B.4) into this gives


( 8Rn + D ) = 4B
(B.10)

Because the coefficient of B here is an integer, B will be unity. Rn is the integer result of dividing the RHS of (B.10) by 8, and D is the remainder. Thus B = 1, Rn = 0, and D = 4.

Now, knowing B, k can be determined from (A.1), thus


k = a2

4B2
= 1.5
(B.11)

Now, in order to determine P from (A.3), it is necessary to determine nr, which in turn is determined from the geometry of the spiral. For integer values of D, nr is given by


nr = ( 4 + D )Rn + 1+u
-l
(B.12)

Here u and l are functions of D and are determined from Table B.1 at the end of this Appendix.

Thus for this example nr becomes


nr = ( 4 + 4 ) 0 + 1+0
-0
= 1+0
-0
(B.13)

So that from (A.3), P can now be determined as


P = a0 - ( 4 (Rn - 1)Rn + nr - 1 ) = 31 + ( 1+0
-0
- 1 ) = 31
(B.14)

Thus in the spiral, insertion of 31 for the Base Number and 1.5 as the Step Size, aligns all the terms along direction H.

When the coefficient of B in the RHS of (B.9) is fractional. B can take several values to align the applicable sequence terms in different directions in the spiral. This is demonstrated in the next example.

Consider the quadratic


N = 64x2 + 18x + 1
(B.15)

Here,


( 8Rn + D ) = 1.125B
(B.16)

(i) B = 4, so that Rn = 1 and D = -3.5 and from (A.1), k = 1. Then from Table B.2 at the end of the Appendix


nr = 2+1
-0
(B.17)

and therefore


P = 1 - ( 2+2
- 0
-1 ) = - 1  or  0
(B.18)

and the terms line up in direction A in the spiral.

(ii) B = 8, so that Rn = 1, D = 1 and k = 0.25. Then nr becomes 6-1+1, and P becomes - 0.5 or 0. The terms then line up in direction E for both values of P, (only the first

two terms are however visible because of the large value of B).

DulDnr ul
-3Rn Rn - 1-3.5Rn + 1Rn Rn - 1
-22Rn 2Rn - 1-2.5Rn + 1Rn Rn - 1
-1Rn Rn -1.53Rn + 1Rn Rn
02Rn 2Rn -0.53Rn + 1Rn Rn
1Rn Rn 0.55Rn + 1Rn Rn
22Rn + 12Rn 1.55Rn + 1Rn Rn
3Rn + 1Rn 2.57Rn + 1Rn Rn + 1
42Rn + 22Rn 3.57Rn + 1Rn Rn + 1
Table B.1 - u and l as a Table B.1 - nr , u and l as a
Function of Rn for Integer as a Function of Rn for Fractional
Values of D Values of D.


Note that these values of u and l only apply for non-zero values of Rn, when Rn is zero, both u and l are also zero.

Finally, there are three directions in which the first two terms of a sequence can straddle the Base Number, (to identify this condition, the first two terms appear in the same spiral ring). Under this special condition the above two tables do not apply and nr is given by

Direction F, (D = 2):- nr =   (4 + D)Rn + 1 ± 0

Direction E + 1/ 2 , (D = 1.5):-

                                                       nr = 2Rn + 1 ± 0

Direction F + 1/ 2 , (D = 2.5):-



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

On to the Next Section:- Appendix C and References

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

Back to the Home Page for this Site:- Home