This page is very bare bones, a bit rushed and lacking visual representations at the moment... I will try to find time to elaborate and add images that help explain.
We are taught about the quadratic function y(x) = a * x2 + b * x + c at high school. It is a fairly simple but important function that has many practical uses, for example, in engineering.
The quadratic formula generates a parabola, if you want to know more about quadratic equations you can learn about them here.
In the Ulam spiral some straight lines are parabolic when translated to a cartesian co-ordinate system. By skipping squares in the integer spiral I am in effect revealing different quadratic equations as straight lines.
If we get rid of the value c by assigning it a 0 value then we end up with y(x) = a * x2 + b * x
y(x) = a * x2 + b * x can also be represented as y(x) = x * (ax + b).
This straight away gives a reason for straight lines in the Ulam spiral that primes cannot land on... because if a and b are integers then the x and the (ax + b) will themselves be different integers... and hence are factors of the number y that we get out of the equation....and hence y cannot be prime! This explanation is a little rushed for the moment... it is explained on Robert Sacks website in more detail.
I keep referencing Roberts website because sometimes we are essentially looking at the same thing in different ways. Robert uses a static number spiral and uses curved lines to locate 'exclusion lines' (a composite curve as Robert calls it). I am keeping the lines straight (well, looking for straight lines anyway) and curving the number spiral (each iteration skips integers and twists the Ulam spiral more and more)
Below is 25 x zoom into the Ulam spiral with number marked.
The first Exclusion lines I found (two wide going North from the centre, and two wide going East from the centre) are the following sets of integers:
There is a trick we can use with these series of numbers to determine the quadratic equation that describes them. It is called the method of common differences, all you need is three numbers in a row from any series of numbers that was generated by a quadratic function and you can backtrack to determine the quadratic function that describes the parabola that those numbers fall on.
After going through the process of the method of common differences we find out that the quadratic formulas that describe the first Exclusion lines that got me started on this adventure are:
- 4x2 - 3x + 0
- 4x2 + 5x + 0
- 4x2 + 3x + 0
- 4x2 - 5x + 0
All of these quadratic equations have a 0 for the for the 'c' value and have integers for the 'a' and 'b' values... hence will always generate composite numbers except, as Robert Sacks points out, possibly for the first non zero value.... which is when x = 1.
Why is it a 'maybe' for x= 1? Probably easiest to use an example....
Take the third formula, 4x2 + 3x + 0.... we can re-write that as x * (4x + 3). Our initial insight was to say that this function (because the 'c' value is 0) will always produce an integer that is composed of two integers (assuming you are using an integer value for x) so we know all the integers this function produces are not prime... we know that at the very least there will be two composites, x and 4x + 3... but if x = 1 then we're really only producing one composite... and multiplying it by 1.
1 is not considered a composite... this is at the very heart of the mathematical definition of primes "Primes are all the positive integers that are wholly divisible by two integers only.... themselves and 1". In the example I have chosen if we plug in x =1 we get 1 * (4 + 3)... which is 1 * 7... which is 7... which is prime.... so our composite generating function fails for x = 1.
Finally the begining of a mathematical explanation!