Saturday, April 24, 2010

Primes in arithmetic progression

How many primes can you find in arithmetic progression (prime AP for short)? Recall that in an AP, the differences between successive members are the same, so the AP has the form $a$, $a+d$, $a+2d$, $a+3d$, $a+4d$, .... Here $a$ is called the "first term" while $d$ is the "common difference". For example, $1$, $4$, $7$, $10$ is a four term AP with common difference $d = 3$.

Here are some examples of prime APs:
  • {$3$, $5$, $7$}, with length $3$ and common difference $2$;
  • {$5$, $11$, $17$, $23$, $29$}, with length $5$ and common difference $6$;
  • {$7$, $37$, $67$, $97$, $127$, $157$}, with length $6$ and common difference $30$.
  • {$7$, $157$, $307$, $457$, $607$, $757$, $907$}, with length $7$ and common difference $150$.
It is easy to check that the prime AP {$3$, $5$, $7$}, with length $3$ and common difference $2$, is the only such prime AP, and a prime AP with common difference $2$ cannot exceed a length of $3$. To see why, we only need to examine the remainders left by these numbers on division by $3$.

It is also easy to see the following:
  • If a prime AP has length greater than $2$, then its common difference must be an even number, and it must feature only odd primes (because $2$ is the only even prime).
  • If a prime AP has length greater than $3$, then its common difference must be a multiple of $3$, and therefore a multiple of $6$ as well (since it also must be an even number). To see why, we only need to examine the remainders left by these numbers on division by $3$.
  • If a prime AP has length greater than $5$, then its common difference must be a multiple of $5$, and therefore a multiple of $30$ as well (since it also must be a multiple of $6$). To see why, we only need to examine the remainders left by these numbers on division by $5$.
  • If a prime AP has length greater than $7$, then its common difference must be a multiple of $7$, and therefore a multiple of $210$ as well (since it also must be a multiple of $30$). To see why, we only need to examine the remainders left by these numbers on division by $7$.
This chain of results may clearly be extended indefinitely.

By these means we can list innumerable necessary conditions for the existence of long prime APs.

But finding such APs is quite a different matter. As of now, it is largely based on trial-and-error, but guided by clever heuristics. In other words: try, try, and try again! To get a sense of the difficulties involved in this, try finding a prime AP of length $10$ or more - on your own!

Recently (earlier this month, in fact), researchers found a prime AP of length $26$. Here is a link to the site where the discovery was announced: AP26 discovery. The first prime of this AP is
\[43142746595714191,\]
and its common difference is this number:
\[23681770 \times (2 \times 3 \times 5 \times 7 \times 11 \times 13 \times 17 \times 19 \times 23).\]
In other words, this AP consists of the numbers
\[43142746595714191 + 5283234035979900 \times n\]
for $n = 0$, $1$, $2$, ..., $25$.

Note that the number
\[2 \times 3 \times 5 \times 7 \times 11 \times 13 \times 17 \times 19 \times 23 = 223092870,\]
which is a factor of the common difference, is simply the product of the first $9$ primes. (You will find numbers of this kind repeatedly featuring in such searches.) You can check that the last member of this prime AP is the number
\[175223597495211691.\]
To verify that all these $26$ numbers are really prime would require a good computer algebra system, like Derive or Mathematica or the free open source package, Maxima. Here is what Maxima tells you when you ask it whether the $27$-th term of the AP is prime or not - that is, the number
\[43142746595714191 + 5283234035979900 \times 26;\]
Maxima returns the factorization
\[29 \times 31 \times 41 \times 59 \times 85433250011.\]
So this particular AP cannot be extended beyond $26$ terms.

As of now, this is the "champion" - the holder of the "world record"! No prime AP of length greater than $26$ is currently known.

But just a few years back, Terence Tao and Ben Green proved that there exist prime APs of any desired length! (We had featured Terence Tao in a previous posting.) In other words, there must exist a prime AP of length exceeding one billion; only, we may never ever find it, for it may well involve stupendously large numbers ...

Here are two other sites which will tell you a lot about this topic: Prime AP records and Wikipedia-primes in AP.
\[\clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit \quad \clubsuit\]

Thursday, April 8, 2010

Views from Terence Tao

Here is an interesting interview with the remarkably prolific Terence Tao, who is one of the youngest Field Medalists ever (he got the Medal in 2006, during the last ICM); it is certainly worth reading:

And here is Tao writing on his own blog, on a topic much discussed these days: the potentialities of the internet in teaching; this is actually a talk given at the American Academy of Arts and Sciences, at their induction ceremony:
What is interesting is that he posted a rough draft of the talk on his blog, prior to the actual talk, and invited comments and feedback, and then incorporated some of what he received into his talk.

Today, in the light of radical changes currently happening in the Indian education system, such as the passing of the Right to Education Act, there is considerable talk going on about teacher education. (There is a gigantic shortage in the supply of trained teachers today.) A key question here is whether Web based delivery systems have any role to play in tackling this vast problem. I think Prof Tao's comments have value in this context. A lot of thought needs to be given to this question, and I invite readers to share their views and post their comments. Links to pieces written about this would be very welcome.

Monday, April 5, 2010

Big numbers!

Here is a delightful piece about big numbers, written by Professor Marcus du Sautoy, who is a mathematician and a remarkably gifted expositor, and Oxford University's Simonyi Professor of the Public Understanding of Science (a post held till recently by Professor Richard Dawkins):
The piece is from the Guardian (published in the UK). If you want to read more about the author, here is another piece from the Guardian:
It not tells you about the author but also describes some of the challenges he faces in today's cultural context.

Teachers will be particularly interested in this essay by du Sautoy, on how to spark off interest in mathematics in young children; it too is from the Guardian:
It is, in fact, a must-read for all mathematics teachers.

Saturday, April 3, 2010

Almost Pythagorean Triples (APTs) - 1

Practically everyone is familiar with Pythagorean triples - triples $(a,b,c)$ of positive integers for which
\[a^2 + b^2 = c^2.\]
If $a, b, c$ are coprime we call the triple a Primitive Pythagorean Triple, or PPT for short. Well known examples are the triples $(3, 4, 5)$ and $(5, 12, 13)$. There is a huge literature about PPTs: how we can generate them in a systematic way, what kinds of number theoretic properties they possess, and so on. Here is a typically striking result about PPTs:
  • If $(a, b, c)$ is a PPT, then $a b c$ is divisible by $60$.
Here are some links to material about PPTs available on my own site, MathCelebration:
Let us now tweak the problem a bit, and ask about triples of positive integers that almost satisfy the condition required of a Pythagorean triple, missing it by the smallest possible margin (namely, by $1$). Thus, we want triples $(a, b, c)$ of positive integers such that
\[a^2 + b^2 = c^2 \pm 1.\]
If the positive sign holds we shall call $(a, b, c)$ an APT - short for "almost Pythagorean triple". And if the negative sign holds we shall call $(a, b, c)$ a NPT - short for "near Pythagorean triple".

But finding APTs and NPTs turns out to be trickier than finding PPTs. The difficulty is caused by the fact that the defining equations are not homogeneous. In the case of PPTs the defining equation is homogeneous of degree $2$; if we divide the equation $a^2 + b^2 = c^2$ by $c^2$, and write $x = a/c$, $y = b/c$, we get the equation $x^2 + y^2 = 1$, whose form immediately brings to mind the equation of a unit circle in the Cartesian plane. This observation if pursued yields a parametric solution to the Pythagorean equation. It is just this approach that has been followed in the articles listed above.

But this approach fails in the case of APTs and NPTs; the non-homogeneity of the equation $x^2 + y^2 = z^2 \pm 1$ negates all such attempts. So for the moment let me not say how we can go about finding them, but simply exhibit a few such triples - found simply by "brute force search" using a computer.

Here are some APTs. For simplicity I have taken $a \le b \le 30$.

a    b    c
_________

4     7     8 
5     5     7 
6    17   18 
7    11   13 
8     9   12 
9   19   21 
10   15   18 
11   13   17 
11   29   31 
13   19   23 
14   17   22 
15   26   30 
16   23   28 
17   21   27 
19   27   33 
20   25   32 
23   29   37 
29   29   41 

(Comment, in passing. The table looks terrible from a typesetting point of view, doesn't it? But I have yet to figure out how to typeset LaTeX-style tables in blogger.)

Try generating more such triples, and look for patterns hidden in them. I think there are more patterns there than one may expect.

The same thing is true for NPTs - i.e., triples $(a, b, c)$ of positive integers for which $a^2 + b^2 = c^2 - 1$. Here are a few such triples, generated the same way (with $a \le b \le 30$):

a   b   c
________

2    2    3  
4    8    9  
6   18  19  
12   12   17  
18   30   35  

If you experiment on this problem on your own, you will hit upon several oddities which are difficult to explain. For example, there seem to be many more APTs than NPTs. Within the region $a \le b \le 30$, the above two tables list all APTs and all NPTs. Observe that the APTs outnumber the NPTs by a fairly big margin. This discrepancy persists as the upper bound is raised. It is not at all clear why this is so.

We'll continue on this theme in the next post.

Jaime Escalante

Jaime Escalante, a mathematics teacher who taught in Los Angeles, California, USA, under very difficult conditions and achieved something truly remarkable, has just passed away (on 30 March 2010). Please see these two links:
There was even a film made about him, in 1988 - Stand And Deliver.

It would be wonderful if we could document similar stories from India. I am certain that there are many, many unsung heroes out there, in the small town and villages, unknown to all except those who studied under them and learned not only the beauty of our subject but also about the vast canvas of life.

Wednesday, March 31, 2010

A curious property of the primes

The primes numbers hold many, many secrets --- but unfortunately for us, they guard these secrets a little too efficiently. Most of the time, when we observe a pattern in the sequence of primes, we are unable to find a satisfactory explanation or proof.

But once in a while we meet a property which is amenable to a simple proof. Here is one such property.

Let $p_n$ denote the $n$-th prime number. The sequence of primes is
\[\left\langle p_n \right \rangle_{n=1}^{\infty} \ = \ \left \langle 2, \, 3, \, 5, \, 7, \, 11, \, 13, \, 17, \, 19, \, 23, \, 29, \, 31, \, \ldots\right\rangle.\]
Let us form the partial sums of this sequence, i.e., the sums

\[2, \, 2+3, \, 2+3+5, \, 2+3+5+7, \, 2+3+5+7+11, \, \ldots.\]
We get the following sequence of numbers, which we denote by $\left \langle a_n \right \rangle_{n=1}^{\infty}$, so that $a_n = p_1 +p_2 + \cdots + p_n = \sum_{i=1}^n p_i$:

\[\left\langle a_n \right\rangle_{n=1}^{\infty} \ = \ \left\langle 2, \, 5, \, 10, \, 17, \, 28, \, 41, \, 58, \, 77, \, 100, \, 129, \, 160, \, \ldots\right\rangle.\]
Here is an interesting property of the above sequence of partial sums:

  • Between every two numbers in the sequence there exists a perfect square number. 

In other words, for each positive integer $n$, there exists an integer $k$ such that
\[a_n < k^2 < a_{n+1}.\]
Note that we are not asserting that there is just one such number: there may well be more than one square number between $a_n$ and $a_{n+1}$. Indeed, a counterexample to such a claim (were anyone to make it) is easily spotted: we find that $a_{11} = 160$ and $a_{12} = 197$, and between the two numbers $160$ and $197$ there lie two square numbers, $169$ and $196$.

Proof, anyone?

Tuesday, March 30, 2010

Proof of the Arbelos Theorem - 2

I have written a computational proof of the arbelos theorem and uploaded it to the "Articles" page of my website, MathCelebration. Here are the exact URLs of the two files (though clicking on them will open the documents in Google Docs):

If you glance through the proof, you will see that it is highly computational, but it uses nothing more advanced or complicated than the theorem of Pythagoras.

The link I gave earlier takes you to the original "pure geometry" proof given by Archimedes, but it shows the congruence only of $\omega_4$ and $\omega_5$. The above proof establishes that $\omega_7$ too has the same radius.

I close with a rather challenging question:


Given the configuration with circles $\omega_1$, $\omega_2$ and $\omega_3$, how will you geometrically construct circles $\omega_4$, $\omega_5$, $\omega_6$ and $\omega_7$? 

(Here, "geometrically" means that we work only with Euclidean instruments.)

Graphics in LaTeX

In today's post I will say something about the graphics capabilities that one can access from within LaTeX.

Two distinct approaches are possible:

  • the diagram to be inserted may be prepared using some external application (this includes the case when the diagram is a photograph, so it is very useful when we have to insert photographs into the document); 
  • or the commands needed to generate the diagram may be included in the LaTeX file itself, in which case the diagram is generated in real time ("on the fly"), as the document is being processed.

LaTeX allows both these approaches. The former option is used when the graphic to be inserted is available as a graphics file (a jpeg or gif or png or eps file). The command used is something like:

\includegraphics[various options, including desired size of diagram]{name of file with path and extension}

The options allow resizing in various ways, cropping, etc. Details on how this is done can be found in any of the help documents listed in the earlier post. (Note. In LaTeX, options are generally placed within square brackets.)

Here I propose to say something about the other situation - when the diagram is drawn in real time.

LaTeX itself has an inbuilt picture editor whose usage is as shown below:

\begin{picture}
... various commands to draw lines, polygons, dots, circles, etc ...
\end{picture}

This is adequate for simple pictures; but it is really very rudimentary in its scope. (I myself never use it, having gotten hooked onto PSTricks early in my LaTeX days.)

That brings me to PSTricks, which in contrast is highly sophisticated and customizable. Precisely because it has been found to be so good by so many users, the community of people working on PSTricks is vast, and new modules (packages) are constantly being released; the basic package itself is constantly undergoing improvements by its authors (Timothy Van Zandt, Denis Girou, Sebastian Rahtz and Herbert Voss).

A typical environment within which a diagram is drawn using PSTricks looks like this:


\begin{pspicture}
... various commands to draw lines, polygons, dots, circles, etc ...
\end{pspicture}


Here are some links for finding out more about PSTricks:


This list should suffice to get you started. Please examine these links - you will find PSTricks to be a really marvelous device for drawing complex diagrams. 

The best thing is that the package is still growing in usability and versatility. There is a very useful mailing list to which a serious user should certainly subscribe; here is its URL:
If you post queries there, you will find answers coming in from all parts of the world.

Do try it out!

Thursday, March 25, 2010

Proof of the Arbelos Theorem

Recently I posted an account of the beautiful Arbelos Theorem found over two thousand years back by the great Archimedes of Syracuse. (See Archimedes's Arbelos Theorem.) Here I give a link to the original proof given by Archimedes:
It is a "pure geometry" proof - it involves almost no computation, and it skillfully uses results from circle geometry and the geometry of homothetic transformations. (Comment. The word "homothety" is of relatively recent origin, but the notion of a homothety or enlargement about a point is an old one.)

However it establishes only that circles $\omega_4$ and $\omega_5$ have equal radius. I do not know any such proof that circle $\omega_7$ too has the same radius.My proof is computational, and I will post it shortly.

Wednesday, March 24, 2010

"Pattern of Signs" - two uploads

I have just posted two pdf files concerning the "Pattern of Signs" post I made earlier in March (here is the link: Pattern of signs), in which I prove the claims and explain the patterns noted in that post. Here are the links to the two files (the contents of the two files are the same, but one is suitable for reading on the screen, and the other one is suitable for printing):
Actually, these links lead to the Google Docs versions of the two articles, but the articles can be downloaded as pdf files by clicking on an appropriate button at the top.

I look forward to observations from readers.

Tuesday, March 23, 2010

A sample LaTeX document - 2

I have uploaded another LaTeX generated document to Google Docs; here is its link: 


The document described the Arbelos Theorem of Archimedes - a theorem dating from Greek times, but with a modern component, discovered less than half a century back.


The figure has been drawn using PSTricks, and the source file too is here for readers to look at:


Do check it out!


(Actually, I tried to upload a Java-enabled "live" figure, which the viewer can manipulate, but Google Docs refused to accept the upload. Or rather, I couldn't figure out a way of doing such an upload. Does anyone know how this can be done?)

Sunday, March 21, 2010

A sample LaTeX document

In my last post I made a few remarks about LaTeX and gave several links, some to sites from where the software could be downloaded, and some to LaTeX help sites and tutorials.


Just to show how a typical TeX file looks, and what kind of output it can yield, I am now posting links to some documents which I just uploaded to Google Docs (and therefore residing somewhere in the clouds). The first link leads to the pdf version of an article I recently published in Resonance, the second link leads to the LaTeX file of the article, and the third link leads to the ps (PostScript) version; it can be viewed using GhostView (or Evince, if you have a Linux based system).
Observe that the TeX file is much lighter than the other two files (just 18 K, as compared with 53K and 228K, respectively). Moreover, the TeX file is a text file (ASCII format) which can be opened by any text editor whatever; so it is platform independent.

The figure drawn on page 3 of the article has been done using PSTricks. If you look within the TeX document you will find the code for the figure in lines 89 through 154. All the commands needed to draw the figure are contained in that code. 

Saturday, March 20, 2010

Typesetting of mathematical text using LaTeX

I have often been asked about the LaTeX typesetting software. I will make a few comments here, and provide some links.


LaTeX is Open Source as well as free software. This has the consequence that it benefits from work done all over the world by extremely well intentioned people who have an interest in its development. There are numerous mailing lists, for example:
These lists are very helpful, with subscribers all over the world willing to give of their time to help you out when you are in doubt.


In working with LaTeX you actually work on a text editor. I use TeXnic Center, but there are many other editors available. See FreeTexEditors. The best and easiest to use, in my view, are: 
They are all freely downloadable.


Note that LaTeX is not WYSIWYG software. When you work on the text editor, all you will see along with the main text are a lot of markup tags - dollar symbols, backslashes, etc. It is only when the LaTex file is processed ("LaTeXed" as a LaTeX user would say) that you will see the typeset output.


Because of this, and because so many of us have been brought up on WYSIWYG software of various kinds, the initial learning curve for LaTeX is a bit steep. But it is important that we do not give up our experiments with LaTeX at this stage, because the effort will be more than worth it. There is nothing like LaTeX! You will appreciate this when you see the quality of the typeset text.


Assuming you are using Windows I recommend going in for MikTeX. Please go to MikTeX and download the entire package (the current version is MikTeX 2.8). The full instructions will be found on that webpage, for the download, installation. Then download one of the editors listed above, and configure it to MikTeX. Note that MikTeX has an inbuilt updating mechanism.


Here are some LaTeX tutorials freely available on the net (there are many more of this kind, please look on the net):
See also:
The last link (ProTeXt) is particularly convenient: it allows you to download a single archive that installs all the packages you need - MikTeX, Texnic Center, Ghostscript, Ghostview, etc. I myself did my entire LaTeX related installation using ProTeXt.


Next time I will say something about graphics editors that work with LaTeX.



Wednesday, March 17, 2010

Tests of divisibility - 3

A small variation in the tests described in the last two posts yields more findings.


Instead of the mapping $10a + b \mapsto a - k b$, what if we have $10a + b \mapsto a + k b$ (that is, with a plus sign replacing the minus sign)? 


Nearly the same steps lead us to see that this yields a test for divisibility by $10k - 1$.


Thus, we consider the following function $g_k$ which acts on the positive integers $x$ as follows: If $x = 10a + b$, where $0 \le b \le 9$, then $g_k (x) = a + k b$. Then we claim that $x$ is divisible by $10k - 1$ if and only if $g_k (x)$ is divisible by $10k - 1$.


To see that this claim is valid, observe that
\[k x - g_k (x) = k(10a + b) - (a + kb) = a(10k - 1).\]
Thus, $k x - g_k (x)$ is a multiple of $10k - 1$. Now:
  • If $x$ is divisible by $10k - 1$, then so is $k x$, and so also is $g_k (x)$ from the above relation.
  • If $g_k (x)$ is divisible by $10k - 1$, then so also is $k x$, from the above relation. And since $k$ and $10k - 1$ are coprime, this means that $x$ itself is divisible by $10k - 1$.
It follows that $x$ is divisible by $10k - 1$ if and only if $g_k (x)$ is divisible by $10k - 1$. This proves our claim.


Just like earlier we get several tests of divisibility from this fact, all at the same time.
  • Putting $k = 2$, we get a test of divisibility by $19$: The integer $10a + b$ is divisible by $19$ if and only if $a + 2b$ is divisible by $19$. So the test is: Add twice the units digit to the rest of the number, and proceed as earlier.
  • Putting $k = 3$, we get a test of divisibility by $29$: The integer $10a + b$ is divisible by $29$ if and only if $a + 3b$ is divisible by $29$. So the test is: Add three times the units digit to the rest of the number, and proceed as earlier.
  • With $k = 4$ we get a test for divisibility by $13$ (which is a divisor of $39$), namely: The integer $10a + b$ is divisible by $13$ if and only if $a + 4b$ is divisible by $13$. So the test is: Add four times the units digit to the rest of the number, and proceed as earlier.
  • Continuing, $k = 5$ yields another test for divisibility by $7$ (because $49 = 7 \times 7$), and $k = 6$ yields a test for divisibility by $59$. 
  • Of particular interest is the case $k = 10$, for then $10k - 1 = 99$, which factorizes as $9 \times 11$. So this is simultaneously a test for divisibility by $9$ as well as by $11$. The test is: Add ten times the units digit to the rest of the number, and proceed as earlier. Then the original number is divisible by $9$ if and only if the final number is divisible by $9$, and the original number is divisible by $11$ if and only if the final number is divisible by $11$.
Quite a rich set of findings, all of which emerge from such a simple observation!