Showing posts with label prime numbers. Show all posts
Showing posts with label prime numbers. Show all posts

August 20, 2014

A Mathematician's Apology

I have just read the awesome book written by G. C. Hardy in 1940: "A Mathematician's Apology". It is a must read. Among other things, he talks about the many aspects of Mathematics and I found there two beautiful theorems which he considers (and I agree) that are accessible to anyone. These two theorems are trustful witnesses of the glory and beauty of Mathematics.

I can hardly do better than go back to the Greeks. I will state and prove two of the famous theorems of Greek mathematics. They are ‘simple’ theorems, simple both in idea and in execution,but there is no doubt at all about their being theorems of the highest class. Each is as fresh and significant as when it has discovered—two thousand years have not written a wrinkle on either of them. Finally, both the statements and the proofs can be mastered in an hour by any intelligent reader, however slender his mathematical equipment.

1. The first is Euclid’s proof of the existence of an infinity of prime numbers. The prime numbers or primes are the numbers which cannot be resolved into smaller factors $$2, 3, 5, 7, 11, 13, 17, 19, 23, 29,...$$ Thus \(37\) and \(317\) are prime. The primes are the material out of which all numbers are built up by multiplication: thus \(666 = 2 ⋅ 3 ⋅ 3 ⋅ 37\). Every number which is not prime itself is divisible by at least one prime (usually, of course, by several). We have to prove that there are infinitely many primes, i.e. that the series never comes to an end. Let us suppose that it does, and that \(2, 3, 5, ... , P\) is the complete series (so that \(P\) is the largest prime); and let us, on this hypothesis, consider the number \(Q\) defined by the formula $$Q = (2 ⋅ 3 ⋅ 5 ⋅ 3 ⋅..⋅ P) + 1$$ It is plain that \(Q\) is not divisible by and of \(2, 3, 5, ... , P\); for it leaves the remainder \(1\) when divided by any one of these numbers. But, if not itself prime, it is divisible by some prime, and therefore there is a prime (which may be \(Q\) itself) greater than any of them. This contradicts our hypothesis, that there is no prime greater than \(P\) ; and therefore this hypothesis is false.
The proof is by reductio ad absurdum, and reductio ad absurdum, which Euclid loved so much, is one of a mathematician’s finest weapons. It is a far finer gambit than any chess gambit: a chess player may offer the sacrifice of a pawn or even a piece, but a mathematician offers the game.

2. My second example is Pythagoras’s proof of the ‘irrationality’ of \(\sqrt{2}\). A ‘rational number’ is fraction \(\frac{a}{b}\), where \(a\) and \(b\) are integers: we may suppose that \(a\) and \(b\) have no common factor, since if they had we could remove it. To say that ‘\(\sqrt{2}\) is irrational’ is merely another way of saying that \(2\) cannot be expressed in the form \((\frac{a}{b})^2\); and this is the same as saying that the equation $$a^2 = 2b^2$$ cannot be satisfied by integral values of \(a\) and \(b\) which have no common factor. This is a theorem of pure arithmetic, which does not demand any knowledge of ‘irrational numbers’ or depend on any theory about their nature. We argue again by reductio ad absurdum; we suppose that the equation is true, \(a\) and \(b\) being integers without any common factor. It follows that \(a^2\) is even (since \(2b^2\) is divisible by \(2\)), and therefore that \(a\) is even (since the square of an odd number is odd). If \(a\) is even then $$a = 2c$$ for some integral value of \(c\); and therefore $$2b^2 = a^2 = (2c)^2 = 4c^2$$ or $$b^2 = 2c^2$$ Hence \(b^2\) is even, and therefore (for the same reason as before) \(b\) is even. That is to say, \(a\) and \(b\) are both even, and so have common factor \(2\). This contradicts our hypothesis, and therefore the hypothesis is false.
It follows from Pythagoras’s theorem that the diagonal of a square is incommensurable with the side (that their ratio is not a rational number, that there is no unit of which both are integral multiples). For if we take the side as our unit of length, and the length of the diagonal is \(d\), then, by a very familiar theorem also ascribed to Pythagoras, $$d^2 = 1^2 + 1^2 = 2$$ So that \(d\) cannot be a rational number.
I love this kind of stuff.

December 27, 2013

Andrica's Conjecture

I've always loved to stare at prime numbers. Probably that happens because I really do not understand their properties. However, taking into consideration the limited capacity of my own skull, I like at least to try to understand what others, much more capable than me, have to say about prime numbers.

And taking about others, I tried these days to find what other Romanian fellows have to say about this topic. And one interesting thing I found is called Andrica's Conjecture.

Andrica's Conjecture

Prof. Univ. Dr. Dorin Andrica works at the Babeş-Bolyai University, Cluj, Romania where he is a full professor within the Faculty of Mathematics and Computer Science.

This is a list of books from amazon.com which contains his name: list.

Among them, there is a book co-authored by the regretted Ioan Cucurezeanu, which was also my own Arithmetics professor. My only professor who put me to take the same exam nine times in a row (for the whole sumer holiday).

Andrica's Conjecture definition can be found here: http://planetmath.org/AndricasConjecture.

It simply states that: Given the n-th prime \(p_{n}\), it is always the case that \(1 > \sqrt{p_{n+1}}-\sqrt{p_{n}}\).

The conjecture is unproved until now. The description states that the conjecture has been proven by computers up to n = 10^5. This looks odd since the vector of primes which I have is build with a trivial version of a sieve and has 50847534 prime numbers.

As always I try to use my rapaio tools, so plotting a line with the Andrica's gap function is easy like

    private void drawAndrica(Vector primes, int size) {
        Frame m = Frames.newMatrixFrame(size, new String[]{"index", "gap"});
        for (int i = 0; i < m.getRowCount(); i++) {
            m.setValue(i, "index", i + 1);
            m.setValue(i, "gap", sqrt(primes.getValue(i + 1)) - sqrt(primes.getValue(i)));
        }
        draw(new Plot()
                .add(new Lines(m.getCol("index"), m.getCol("gap")))
                .add(new ABLine(0, true))
                .setYRange(0, 0.7),
                700, 300);
    }

First we plot the function for the first 500 values.

graphics

What is already been discovered is that the largest known difference in this function happens for a small n, aka for n=4.

The plotted function looks like a decreasing function (not monotone, but decreasing on average). The question is, if we plot many values the tendency remains the same?

graphics

This are all the prime numbers I have at hand. There are more than 50 millions. And the graph shows the tendency is to decrease on average. Which is really interesting. This is not a proof, of course, but one could find reasonable to expect the conjecture to be true. Nice work Dr. Andrica!