MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hello everybody!

I am interested in learning computational number theory and doing some computational experiments by computer!

I was wondering which sort of number theory problems can be solved by using computers! for example, is it possible to determine the ring of integers in number field extensions or for example find the discriminant of the extensions!

To what extent one can get help of computers for solving number theory problems?

What is the best software for this purpose? Maple, Mat lab, Pari/gp or Mathematica ???


share|cite|improve this question
up vote 7 down vote accepted

First, this question is extremely broad and thus I hesitate to start answering it, but anyway some remarks.

Number therory is a broad field and there are many different types of problems to which "computers" can contribute in one form or another.

Since you ask about rings of integers let me focus on this.

Regarding literature: One book I can recommend is Henri Cohen "A Course in Computational Algebraic Number Theory" and there is also a follow-up "Advanced Topics in Computational Number Theory".

In this book the author explains, among others, how to solve the basic tasks of Comptuational Algebraic Number Theory. So how to calculate with algebraic numbers, calculating rings of integers, discriminant, Galois group and so on. Also, certain methods of factorisation are discussed as well as question on arithemtic of polynomials.

The author is/was a main contributor to the development of Pari.
Pari is specialized for number theory; opposed to the other programms you mention.

Roughly, the functionality of Matlab is not geared towards number theory. Mathematica and Maple offer more here, certainly useful for some things and for some even very good as far as I know, but not specialized for number theory. An important (non-free) other program is Magma, which is I think considered as leading for certain number theory (related) tasks.

And, last but certainly not least, there is a large free open-source project Sage that has a certain focus on number theory (the founder William Stein is a number theorist). It inculdes (more or less) Pari and much other free open-source math software; some directly or indirectly relevant for number theory.

If you search for a possibility to do computational number theory and to potentially do something of lasting value, I would recommend that you look into Sage. Its web page offers a lot of documentation but also (number theory) papers written with the help of Sage. Yet also (number theory) lecture notes and text books with a computational slant. The developpment process seems very open and there are plenty of tasks to be done (from small to large, from beginner friendly to research level). [Note: I did not contribute anything to Sage, I only followed its developpment from a distance but somewhat in detail.]

share|cite|improve this answer

You might be interested in Project Euler (, which guides you through solving progressively more difficult math problems using computer programming. This is not exactly what you asked about, but is rather a complement to quid's excellent answer.

share|cite|improve this answer

There's a different sort of number theory, combinatorial, that benefits tremendously from computation and experimentation. An excellent website to get you started is Borwein and Bailey (responsible for that website) are two of the champions of using computers to find new results, and Zeilberger is the godfather of using computers to prove combinatorial results.

Surprisingly, of the various branches of number theory (analytic, algebraic, combinatorial, additive), it seems to me that analytic number theory has benefited the least from experimentation.

share|cite|improve this answer
To me it is indeed surprising that you hold the believe in the last line ;D What about the Prime Number Theorem? It was conjectured based on data/experiment. Or, for some though likely not all people believe in the Riemann Hypothesis is mainly due to experimental data. The Mertens conjecture was disproved using computation. – user9072 Jun 29 '12 at 17:18
The PNT was conjectured based on data from 200+ years ago, the RH on data from 150+ years ago. I think you have the situation with Mertens Conjecture backwards: it was supported by data but is now known to be false. – Kevin O'Bryant Jun 29 '12 at 18:11
Well, even if old, to me PNT and RH seem like a lot of benefit. Regarding Mertens: the disproof involves computation, see in particular section 4 of the orig. paper – user9072 Jun 29 '12 at 19:08
Certainly. I did only write "the least", after all. What I had in mind when I wrote that was that of my friends (not a random sample) in the various areas, the analytic number theorists are the least likely to use experiment to figure out what is true, or to decide how to steer a proof. – Kevin O'Bryant Jun 30 '12 at 4:37
Interesting. I agree ones view on this could/should well depend one various (subjective) factors. Likely also on where one draws the line between the different subfields. – user9072 Jun 30 '12 at 12:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.