An Overview of Number Theory: Live with the R&D Team

Lecture-style live presentation (YouTube) by Lucina Tsukayasan of Wolfram Research giving an introductory tour of number theory and the Wolfram Language functions that implement number-theoretic computations. Covers primes and factoring, primality testing, divisibility and divisor functions, modular arithmetic and congruences, Diophantine equations, number representations (digits, continued fractions, partitions), analytic (multiplicative/additive) number theory, and algebraic number theory; includes demonstrations, plots, and references to Wolfram Language functions and notebooks.
Chapters
Hello and welcome to our live stream. I'm Lucina Tsukayasan and I work here at Wolfram Research in the Discrete Computation team. And today I'm going to present you with an overview of number theory. I'm going to talk about number theory, number theoretic functions, number theoretic capabilities in the Wolfram language. So let's begin. So, number theory, what is number theory? First of all, number theory is one of the oldest and most intuitive fields of mathematics. It studies integers and their properties. It is called sometimes arithmetic or higher arithmetic. So as a very famous mathematician, Carl Friedrich Gauss, once said, mathematics is the queen of sciences and arithmetic is the queen of mathematics. So Warframe language draws on almost every major result in number theory, packing a large number of sophisticated algorithms, algorithms many recent and regional, into a powerful collection of functions. It's been a key tool for two decades in the advance of the field and Wolfram languages. Symbolic architecture and web of highly efficient algorithms make it a unique platform for number theoretic experiments, discoveries and proofs. As I said, today I'm going to talk about number theoretic functions in the Wolfram language. And we group them in the following factoring and primes, divisibility, antidevisors, concurrency, modular arithmetic, number representations, TF and TIN and other equations, analytic number theory and algebraic number theory. I mean, we will talk about the most basic functions, the most important, the most well known functions, because that's the time we have. We can talk about each of these categories if you'd like, for hours and hours. But today we're going to just give you the basics and we will post a notebook and the links will be there. You can just go and explore this wide range of functions. So let's begin. Let's begin with the first group of functions which is about factor and of course factoring in primes. I mean, if you hear the word number theory, that's what comes to your mind. Probably the first is prime numbers. I mean, the primes have been a focal point for investigation of numbers for more than two millennia. And let's just start with this beautiful quotation by Polar Dose, who said, God may not play dice with the universe, but something strange is going on with the prime numbers. So Ortholanguage implements the modern algorithms for handling both primes and the advanced mathematics that has grow up, run their study. And these functions again, we grouped all the functions concerning factoring and primes into the following categories. Generating primes, sequence of primes, primality testing theorems and equations. Let's begin with generating primes. And here, of course, the most, the first, the basic function is the function prime, which gives you the nth prime number. For example, you can use it to quickly find the millionth prime. And here you go, this is the millionth prime. Or the next function is the function next prime, which gives you the smallest prime above x. So you can find the next prime after 1000 by simply doing next Prime 1000. Or you can visualize the gaps between primes below, say 10 to the power of 4. And get this nice visualization by doing next prime s and Next Prime S minus 1. So as I said, next Prime 1000 gave you the next prime after 1000 and the next Prime 1000 minus 1. What does it give you? It gives you the prime just before 1000. All of these functions that we're talking about today, they have their different kind of verifications. You can go check them, the reference pages, they will have the links. We won't go in details. But yeah, all the functions have different verifications, modifications, but we're only going to use the basic ones today. So the next function in this category is the function random prime, which gives you a pseudo random prime number in the given range. For example, you can find a random 10 digit, 10 digit number, 10 digit prime by doing this random prime 10 to the power of 9, 10 to the power of 10. Minimum value, maximum value in this range. Find a random number, a random prime number. The next function in this category is the function Mersenne prime exponent, which gives you the nth Mersenne prime exponent. So what is it? The Mersenne prime exponent is a prime number P for which The Mersenne number 2 to the power of p minus 1 is prime. For example, we can find the first 10 Mersenne prime exponents. By doing this. We can find. This is the table of the first ten Mersenne prime exponents. The next group of functions Here is the sequence of primes. And here the most important function is the function prime PI. So that function gives the number of primes PI x less than or equal to x. And by the way, it has nothing to do with the number the constant PI, it's just that's how we denote it. This is a very important function. We'll talk about this function again later. But and this is just because the functions, some functions fall in, of course, they fall in more than one category here. So let's just start with the basics. Prime PI. You can compute the number of primes up to 10 to the power of 10 by just doing this. So there are these many prime numbers less than or equal to 10 to the power of 10. Or we can do some fun and we can generate a path based on the prime PI function. And here you go. This is the prime path function from the values 1 to 1000. And this is a nice sort of visual stuff here in the Wolfram language. The next one, the next function is the zeta function, the function zeta, which gives the Riemann zeta function zs, which is defined like this. This is a complex valued function from analytic number theory. This, this is quite a. You know this. There are some major and serious results. But let's not just go, let's not go there. Let's just play with it and play with it. And you have a function, of course you want to plot it. So here we can do, we can plot it over reals, we can plot the zx function over the subset of reals, or we can plot it over a subset of complexes. And yeah, this is what we get. Here we go. Some other functions in this category are Z0 log integral, Riemann, Riemann, Sigl, Riemann zeta P and other. So the next category is again a very important category of functions. Primality, testing prime Q is one of the functions. And as you can guess, prime Q is used to test whether an integer is a prime number or not. So for example, we can test whether the number 119 is prime or not by just simply doing this. And false, it's not a prime number. Similarly, composite Q is used to test whether an integer is a composite number. So we can test whether 149 is composite or not by simply doing this. And this gives you false. So that's not composite number, that's a prime number. The next one is the function co prime Q which is used to test whether two numbers are relatively prime. So what are relatively prime numbers? Two integers are called relatively prime or mutually prime or co prime when the only positive integer that can be used to divide both, both of them is 1. So we can test whether 8 or 11 are co prime or not by simply doing this. And yes, they are co prime. So integers are relatively prime, of course, if their greatest common divisor is one, there's a function for that. We have a function for that. We'll talk about it later. But you can also, this is equivalent to this. So to their greatest common divisor being equal to one. The next one we already talked about Mersenne prime numbers. And the next function is Mersenne prime exponent Q, which is to test whether an integer is a Mersenne prime exponent. So for example, we can test whether five is a Mersenne prime exponent by simply doing this. And yes, and we can check, you know, do you remember the definition that 2 to the power of 5 minus 1 will be 31 and 31 is a prime number, and that means that 5 is a Mersenne prime exponent. Or we can just do some nice sort of, again, some visual stuff. We can highlight Mersenne prime exponents here for numbers up to 100 and they're highlighted in red. Prime power Q is again as a basic function which is used to test whether a number is a power of a prime number. So for example, we can test whether 9 is a power of a prime number by simply doing this. And yes, nine is a power is is three squared, it is a power of a prime number. Or we can write this really cool simple function to recognize Mersenne numbers. Because what is a mersenne number, right? 2 to the power of n minus 1, that should be prime. And if we add 1 to 8, that should be even 2 to the power of N. And that should be a number, a power of a prime number. In this case, it should be a power of two. So we can do this and using this, our simple function, we can check that this number, this number that you see is a Mersenne number, whether this one is not a Mersenne number. Okay? And the other subgroup, which is a bit different is theorems and equations, which are not quite function number functions that are like prime PI, gcd. But these functions, we use them a lot. If you want to compute something like, for example, primes. What is primes? It just represents the domain of prime numbers. And we can use it to test if whether this number is prime or not by simply doing this. Does this belong to primes or not? We can, the equivalent of it would be this one. We can just checking, just using the function prime Q that we already talked about. Or you can, there's a function reduce and we can use it to reduce expressions over the primes, or we can use full simplify to simplify expressions assuming numbers are prime. For example, here we have this inequality and we can find solutions to it which are prime numbers. In this case, two and two are solutions. Or we can simplify an expression over the fields of prime. So we want to simplify this expression assuming that P is a prime number. And this is actually a very, you know, they're Very famous results. That is called Wilson's theorem. You can read about it on the Internet. This is a very famous result. And here you see that the symbolic capabilities in the Wolfram language are quite strong, really. Or we can use the function findinstance and that can be used to find solutions again over primes. For example, we want to find a prime number that is greater than 10 to the power of 10. And here is an instance of a prime number that is greater than 10 to the power of 10. So in this group. Now let's go to factoring. We talked about primes. Now what about factoring the prime factorization of integers is one of the key notions in number theory. It says that every natural number can be written uniquely as a product of primes. And the unique factorization is needed to establish much of what comes later. It gives an alternative, conceptually simpler way to find a lot of numerical characteristics of a number. So let's again, here functions are grouped into the functions about factors factoring and the functions about factoring related functions. So factoring, of course, that's the most basic function is factor integer. That gives you a list of the prime factors of an integer together with their exponents. So if we want, if we want to find the prime factors and the prime factorization of 120, we just do this. And here you go, 2 to the power of 3, 3 to the power of 1, 5 to the power of 1. And we can check by doing this simple thing, right, we can just multiply them. We get the number, and this representation is unique. We can even use this integer for computing for very large integers like this. And you see, we just very quickly get the results and look how big their prime factors are. So prime numbers are called, sometimes are called the building blocks of integers. And why is it so? Because every integer is a prime or a product of primes. And here you can see that our machine just picks some random number and gives us the prime representative, the prime factorization of that number. And this representation is unique. Okay, so the next one is a bit. The integer exponent gives the highest power of P that divides n. We can use it in many different ways. For example, we can find the number of trailing zeros by doing this integer exponent and taken 10 as a B, and we get 4. Or we can just find powers of 2 in successive integers and find and get this nice plot which gives, as I said, powers of two in successive integers. Right? The next one, the next function I want to talk about a square free Q, which is used to test whether a number or a polynomial is square free. For example, we can test that 10 is a square free number. And we can check by doing this because you see, it's just equals two to the power of one times five to the power of one. There are no squares here. Yes. And the next one. Okay, let's go to the next group, which is factoring related functions. There are a lot of functions that come from the definition of prime factorization. Very important functions. Let's talk about some of them. The prime u prime omega are the prime omega functions. The prime omega functions count the number of prime factors of a natural number n. For example, the small prime omega function prime U counts the number of distinct primes of N. So if we have the following representation, the following prime factorization of N, then the prime U will equal to m. So for example, we can use it to compute prime U for 24 and we get 2. The big omega. The big prime omega counts the total number of prime factors event taking into account their multiplicity. So again, if N is has the following prime number representation, then the big omega n equals this one. And we can compute it again for 24. And we can check, we can just do factor integer 24. And you can see that all of these are derived from the notion because three plus one is four and it has two different prime factors. And so the prime mu, the small prime will be two. It was two. There's again a function level lambda which gives the luvial function lambda n. A very important function which is defined as follows is if N has the following prime number representation prime factorization, then the level lambda n equals this and as you can see it only takes two values, minus 1 and 1. Here is the table for all values from 1 to 10 and we can compute it. You can compute a level function at 8, you see, it's minus 1 and we can plot it. Plot that sequence for the num for the first 50 numbers and you get, you just get minus one and one values. Mango Lambda function is another one. It gives you the mangoes function lambda n, which is defined as follows. If n is a power of a prime, then lambda n equals to log p logarithm of p And it is zero otherwise. And so we can compute it at 25. And we can also plot, we can plot the mangled lambda sequence for the first 100 numbers by just doing discrete plot mango lambda n 100. So another function is Mobius mu, which we might, or which might. We will talk about about that function later. So yeah, these were the most important, the basic functions in this category, factoring in primes. Next is about. Next is again a very, very important notion, divisibility, the functions about divisibility and divisors. So divisibility is, you know, one of the key notions in number theory. Let's just say. Quick, give the definition quickly. So the number D divides the number N if there exists an integer k such that N equals d times k. So N is called a divisor, N is a divisor of D and D is a multiple of N. And what are the functions that we use here? Of course, divisible, which gives you true if N is divisible by M and false otherwise. So we can test whether a number is divisible by 19 by simply doing this. And yeah, true. And we can check it, of course, 437 divided by 19 is 23. Or we can do some, we can do some symbolic stuff and see that this expression is always divisible by 15 when n is an odd integer, right? And we can check it for all the n up to 100. And yes, all the numbers are truly, truly divisible by 15 here. Or we can just highlight numbers that are divisible by three. And yeah, you get the numbers that are divisible by three are highlighted in red here. The next functions are GCD lcm. Of course, the GCD gives the greatest common divisor of numbers and LCM gives the least common multiple of numbers. So to find the GCD and the LCM of two numbers you just do simply GCD418. So the greatest common divisor is 2, and the least common multiple in this case is 36. And a function that is really connected with this GCD LCM is the Euler Totian function Euler phi, which, what does it give? It gives the number of positive integers up to some integer N that are relatively prime to N. For example, we can compute the other totient function of 10 by simply doing this. And there's a very sort of. There's a great result for any prime number P and natural number R. You get this, yes, you get this equation. And again we can can assume that P is a prime number, R is an integer and R is a positive integer. And we can expand this function and we get this nice formula. Again, this shows how strong or from languages in symbol and computations. And again, so other functions are extended gcd, Mobius, mu, jkb, symbol, chronic or symbol that are in this category divisibility ends. We talked about Divisibility. Let's talk about divisors. As I said, B is a divisor of A. If there exists an integer case such that A equals K times B B. So what are the functions here? Divisors, of course. Which gives a list of the integers that divide n. For example, the divisors of 1729. You just simply do this divisor 1720 and you get a list of divisors and you can hear even check that yes, all of them are divisible. All of them divide 1729, the function here. The next one is divisor sigma, which gives the divisor function sigma kn, which is the sum of the kth powers of the integers. So the sum of divisors of 20 is just divisor sum 120, the sum of squares of divisors of 20s divisor sigma. You just write 2 here, 2, 20, and you get this number and we can even do this nice plot and compare the plots. Compare the number of divisors, compare the sum of divisors and the sum of squares of divisors. And divisor sum. It just represents the sum of form E for all E that divide N is basically a sum for all the divisors of a number like this, right? For all the divisors of X. And we can use it to find the sum of squares of divisors 20 by doing this, 20. And then we just find the square, the sum of squares of divisors. The other functions here are dedekind, eta, elliptic, theta, that you can look later on your own. The next. The next category is congruences and modular arithmetic. So this is a very broad subject. The congruences are of great practical importance. Importance in both number theory and everyday life. The theory of congruences was introduced by Gauss. He created a new branch of number theory by introducing a remarkable notation. Congruences satisfy a number of important properties and are extremely useful in many areas of number theory. And here you see the clock, the 12 hour clock, because modular arithmetic is sometimes called a clock arithmetic. That's because that is clock arithmetic is the modular arithmetic modulo 2. And there's a very nice connection. So the functions here are mod, which gives the remainder on division of n by n. So compute 5 mod 3 by just doing this. Or we can just plot the sequence with fixed modulus, you know, by doing this. And of course the values are only 0, 1, 2, 3, 4, 5, 6 and 7, because the model theory is 8 power mod is another important function which is known as modular exponentiation. It just gives you do A to the power of B Mod M, like compute 10 to the power of T mod 3 easily by doing this power mode, A minus 1 M finds the modular inverse of A modulo m. Like in this case we can find the modular inverse of 2 modulo 5 by doing this. And of course we have a function for that that is modular inverse. It gives the modular inverse of K modulo n. So we can compute the inverse of 3 modulo 5 by using that function and we'll get 2. Or we can plot the sequence of a fixed modulus like this. Other functions here are multiplicative order, primitive root, Chinese remainder power mod list, Carmichael lambda primitive polynomial Q. Okay, so you know that the next category is diofantine and other equations, which is a huge subject in amper theory. What is a diofantine equation? It is a polynomial equation usually in two or three or more unknown, such that only the integer solutions are sort of or studied. It's very difficult to really to solve a given geofunctine equation. It's not possible. So we just, you know, say we solve a certain like a given tier of Anton equation. And so here we don't have like functions like a T of 19 equation. Finding the. We just, we can sort of, we can also manipulate on them using these functions like. Like for example, integer, right? It just represents the domain of integers because our solutions, we want them to be integers. Like for example, you can use it to check if the number of 7 is integer or not by simply doing this. Or you can use reduce, like we talked about, introduce expressions. For example, this is x squared plus y squared is 5 squared. That is a different equation. And we want to solve it over integers. And what do we get? We get results. Yeah, three and four, that's the solutions. And actual three, four, five are Pythagorean triples. So basically we just found a Pythagorean triple. Or we can use find instance to find solutions of t of 19 equations. Like in this case, this is again, this is two tfontein equations. And we want to find their solutions over the integers. And the system just gives you this, you know, this is an instance of a solution. As I said, geofence equations are a very broad subject. So it's what do we do? We narrow down mathematicians, narrow down the subject and we. The simplest kind of geofentine equation is the linear geofentine equation. So a linear GeoFentine equation in two variables is an equation of the form A times X plus B times Y equals C, where ABC are integers. And the goal is to find the integer solutions X and Y. It's very interesting to look at them geometric. So geometrically a linear Geoff. And equation gives a line and the solutions to the equation are the integer points that are on the line. And you see here, in this nice example, you see that we just manipulate, we change the equation. You see here, you see the equation here about the plot. And we can zoom in, zoom out, and the red lines actually are the integer solutions here. Right? This is a very nice fine thing. The other functions are the rational rules, algebraic primes and. Okay, now let's talk about number representations. We already talked about, we, so far we talked about natural numbers, but there are many way, there are many numbers and there are many ways to represent numbers. And Wolfram is quite good at that. So let's begin with digit representations. And let's begin with a function with a very basic function, integer digits, which gives a list of the decimal digits in the integer N and integer digits NB gives a list of the base B digits in the integer. And so, for example, we can find digits in base 10, like doing this or in base 2 by doing this again using the same function from digits constructs an integer from a list of decimal digits. Like we can construct an integer, construct a number from its base 10 digits. And here you go, you can also. We can also use symbolic digits and base. You see, this is the base and this is the symbolic digits. Base form is another function which prints with a number in expression given in base. And like, for example, this is the the number 33 in base two. Right? We can do a nice sort of table. We can do a nice table and see that expansions in different pieces can be terminating or non terminating for the same number. We just change the basis, but the number is the same here. Number decomposes another function. It returns a list of coefficients of a decomposition of the number X in the basis u1 to un. So for example, we can decompose an amount of money you see in different denominations by doing this and it returns a list of coefficients. Or we can decompose an amount of seconds in days, hours, minutes and seconds by doing this. Other functions are real digits, integer reverse integer part, integer name. So the next group here is about continued fractions and rational approximations. A continued fraction, what is it? It is an expression obtained through an iterative process of representing a number as the sum of its integer part and the reciprocal of another number. Then writing this Other number as the sum of its integer part and another reciprocal, and so on. And Wolfram language has highly efficient algorithms for finding large number of terms in continued fractions, as well as for handling exact continued fraction for quadratic rationals. So let's start with the most important function, which is continued fraction. It generates a list of the first n terms in the continued fraction representation. Like we can, for example, let's find 20 terms in the continued fraction for PI and this is it. Or we can find for terms in the, in the continuous fraction for a rational number 47 over 17. And from continued fraction actually reconstructs a number from a list of continued fractions. For example, we just found these are the terms. And using these terms, the function from continued fraction, it just recovers the number. Convergence is another function that gives a list of the convergence corresponding to to the continued fraction terms. For example, we can find the convergence for a rational number by doing this. And you can actually see that the convergence actually tends to that number in this plot, right? This is the line is Our number is 272 over 105, and the convergence actually tends to the number. Now let's talk about King Jing. This is the first constant mathematical constant that we're going to talk about today. So far we only talked about functions. So it's a mathematical constant which is about 2.68545 and so on. And it is connected to these results that mathematician Alexander Himchen proved, which says that for almost all real numbers X, the terms AI of the continued fraction expansion of X have a finite geometric mean that is independent of the value of X known as Hinching's constant. Basically, mathematically speaking, in mathematical terms, this is what he's saying. And here in this plot, the Hinton's plot, is the red line. Hingen's constant is the red line. And you can see that this value indeed for almost all real numbers, tends to the red line. That is actually a mathematical term for almost all the numbers. But let's not go there. So let's just check for PI. Let's just check for log to the power of five, you know, PI to the power of PI, golden ratio. You see, it didn't work because we said for almost all real numbers, square root of two, it didn't work. P to the power of E. Again, it works. Yeah. So other functions are rationalized, quadratic, irrational Q, continued fraction K. Okay, now let's continue this number representations and let's just talk about representing the sums of powers. There's, there are actually two functions here I want to talk about. One is squares, R D, N, which gives the number of ways to represent an integer n as a sum of d squares. For example, we can find a number of ways to represent 45 as a sum of squares by doing this. And you see, there are eight ways to represent 45 as the sum of squares. Or this function power representations nkp, which gives the distinct representations of the integer N as the sum of k non negative pth integer powers. Like in this case, we can find representations of 1729 as the sum of two cubes by doing this. And you see that indeed 1 to the power of 3 plus 12 to the power of 3 is 1729. So is this number. And actually this is called a tax cap number. Very interesting numbers. 1729 is the smallest number that can be represented as a sum of two cubes in two different ways. And Ramanujan discovered these numbers. You can actually read about taxicab numbers. Another function here is elliptic theta. Now let's talk about partitions, integer partitions. What does it do, this function? It gives a list of all possible ways to partition the integer N into smaller integers. Like let's find all the partitions of five. Yeah, these are all the partitions of five partitions. P gives the number PN of unrestricted partitions of the integer n, while partitions Q gives the number qn of partitions of the integer n into distinct parts. For example, partitions p for 20 is 627 and partitions q for 20 is 64. Yeah, okay, so these were sort of the we talked about. We didn't so far talk about real difficult analytics stuff. And now let's talk a bit about analytic number theory. What is it? It is a branch of number theory that uses methods from mathematical analysis to solve problems about the integers. Analytic number theory can be split up into two major parts, divided more by the types of problems they attempt to solve than the fundamental differences in techniques. And the two subgroups are multiplicative number theory and additive number theory. So let's just go into these subgroups now. So multiplicative, what is it? Multiplicative number theory. It is a subfield of analytic number theory that deals with prime numbers and with factorization and divisors. The focus is usually on developing approximate formulas for counting these objects in various contexts. So here the subgroups are ZF functions, tiered class series, arithmetic functions, prime numbers, perfect numbers, and some operations on them. And let's begin with zeta functions. Again, the Wolfram language supports zeta Functions of a complex variable. In full generality, one of the functions is that is we already talked about the zeta function. Let's now Talk about the z0 function that represents the 0 of the Riemann zeta function on the critical line. For example, using this function we can visualize the function first 10 zeros of the Riemann zeta function. Other functions you can see on your screen are zeta, Riemann zeta, Riemann e theta and the other functions. The next subgroup is dirty series. So tierclet transform is one of the functions here and it just gives the diraclet transform of expression with respect to n. The diraclet transform for discrete function is given by this sort of formula. For example, the Diraclet transformation here 1ns is just zs and the Dirklet transform in this case is just the function the special function polylog. Another function here is tier CLE arithmetic functions. Let's talk about them. They're very important. So really what is it? An arithmetic function is any function fn whose domain is the positive integers and whose range is a subset of the complex numbers. For example example Mobius mu. We didn't talk about it. You know, this function was also in the category of factoring related functions. But now let's talk about about it here it gives the Mobius function mu N which is defined as this. If we have the prime factorization of number N and it is this, it has, then the Mobius function is defined as this, right? Minus 1 to the power of m if k 1 equals to km, that is 1 and 0 otherwise. So now it takes three values, minus 1, 0 and 1. You here sees the table of the values. The other functions in the other arithmetic functions are divisors. For example, we talked about it, divisor sigma, Euler fee, prime numbers. Okay, as I said, prime PI. We talked a bit about prime PI. But this is really what's interesting about it. The actually this is how the whole subject of analytic number theory sort of, you know, got created because of they people wanted to find the estimates of the function prime PI. And here you can see in our screen that yes, the estimate the estimates of the prime PI are x over log x and log integral. And you can see that on your screen that they are really the plot really shows that there are estimates. The other functions are prime u, prime omega, prime, dual lambda and mangles lambda. Now let's talk about perfect numbers. We didn't have a chance to do it, but it's a very interesting thing in number theory. What is it? A perfect number gives the Nth perfect number, that's the function in Mathematica in the Wolfram language. And perfect number Q tests whether a number is perfect. So a perfect number is a positive integer that is equal to the sum of its positive divisors excluding the number itself. For example, A28 is a perfect number because. Because you can check. This is what I was talking about. This is the sum of its positive divisors excluding the number itself. And it just equals 28. Here are the first 10 perfect numbers. We can even check, check them if they are perfect or not by using the function perfect number Q. Yes, they're perfect. And here is the plot of the length of the first 47 even perfect numbers, log scale values. So you see that they are very rare. They grow very rapidly. And there's also a peculiar connection between perfect numbers and Mersenne primes. So the first one is, if P is a Mersenne prime exponent, then 2 to the power of p minus 1 times 2 to the power of p minus one is a perfect number. For example, 5 is a Mersenne prime exponent. And we can put 5 into this formula. And what does it say? It says that this number 496 should be a perfect number. And yes, that is a perfect number. So the other way, every even perfect number has the form 2 to the power of p minus 1 times 2 to the power of p minus one, where p is again a Mersenne prime exponent. So take this number and check that, yes, this is a perfect number. We can guess what P should be by using the function that we already talked about, integer exponent. So okay, P really is P minus 1 should be like 6. So P should be 7P. And we can check here, I think, yeah, this here's. There has been a typo, but that should be. Oh yes, yeah, there you go. Two to the power of seven minus one times to the power of seven minus one gives you this number. And yes, seven, you can check that is a Mersenne prime exponent. Here is the table of the first eight. You can compare Mersenne primes and corresponding perfect numbers. These are perfect numbers. And this is the corresponding Mersenne primes. The other functions here are Mersenne prime exponent, Mersenne prime exponent Q. Now let's talk about operations. I mean, of course, because we have. We deal with functions, all kind of complex functions, and there are some operations that are useful here, like sum product integrates. Seriously, image. We'll not talk about that because they are not purely number Theoretic functions. But you can, we can look at them. Yeah, they are very useful here. Additive number theory. So there was multiplicative number theory and there was additive number theory. What is it? Additive number theory is the subfields of number theory concerning the study of subsets of integer integers and their behavior under addition. So here are the groups are integer partitions, base flag representations, representation in terms of powers, summation, related operations, arithmetic functions. We already talked about all of these functions last night over there. But this is just to tell you what is what an additive number theory is. And the functions there in the categories that the functions here are grouped into. Okay. Algebraic number theory is another category. Number theory is a branching number theory, actually that uses the techniques of abstract algebra to study the integers, rational numbers and their generalizations. Here the functions are grouped in these categories, algebraic numbers and representation, for example, Right. What is this function? Algebraic number is an algebraic number represented in a particular field, right? We can represent an algebraic number by doing this. We can even do some arithmetic with it and we can get a numerical approximation. The other functions are root, root, approximate minimal polynomial and the other functions. So the algebraic number field, what is it? For example, one of the functions here is two number field which finds a common field or expresses numbers in a given field. For example, we can do this. We can express square root of 2 in the number field generated by this number. Yeah. The other functions are number, field, integral basis, number, field, class, number and the others factorization. We talked about it. So here I want to talk about this. Gaussian integers, which allows factorization over Gaussian integers, right? We can factor 36 over Gaussian integer integers by just adding this option, this method, right? Caution, integers goes to true. And this, you see, you get minus 1 to the power of 1 times times 1 plus I to the power 4 times 3 squared. That should be 36 over that field. We can just. If we just say. If we just say, okay, factoring 00:36, it just gives you the factorization over natural numbers. The other functions here they are. So the functions here are factor, integer, factor. And now again of two sort of functions that we use in this category are extension, root reduce. Extension is a field extension for number theoretic and polynomial operations. For example, factor a polynomial over this field and this is what you get. Extension sqrt2 or use root reduce and that reduces an algebraic number to minimal root form. Yeah, like this. Another function here is two radicals. So yeah, this was it. This was it. A very sort of of brief introduction to namp. Theory capabilities in the Wolfram language. The notebook will be posted. You can look at it with all kind of links here and you can. These are. This will refer to some. To the reference page of Mathematica. And you can just go there and read about all these functions in more detail. You can look at them at the examples. There are a lot of examples, but all the functions. So the notebook will be posted, you'll get the links and so what is next? What is next? Number theory in our company, of course, functionality, new functions, you know, better performance. We're now working on writing courses and books about number theory using law firm language, where the stress is going to be just on number theory and just Wolfram language is just the tool that we have and of course we always and always improve the documentation. Yeah. So let me just go to your questions real quick. Yeah, I think not really. I think that was it. You can again, there's a post in the Wolfram community page. You can. You can ask your questions there and we'll answer you. Sa.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






