Rational Numbers

by Kassie Smith

First, let's talk about rational numbers and repeating digits. A rational number is any number that can be expressed as a fraction of two integers, say where q is not zero. Notice that q cannot be zero since that would make undefined, but q can be 1. Thus, all integers are rational numbers. Another property of rational numbers is that the decimal expansion of the number is either finite or it will repeat the same sequence of numbers indefinitely. For instance of a finite decimal expansion, take . Its decimal expansion is 1.5. So, we can see that the the decimal expansion ends after just one digit. Take as an example of a rational number with a repeating decimal expansion, 0.333.... I will not go into this here, but a number whose decimal expansion is not terminating or repeating is an irrational number.

More on the repeating decimal expansion.... Now, let's consider only those fractions where the denominator, q, is prime but not 2 or 5. From Fermat's little theorem, the period (the number of digits in the repeating term of the decimal expansion) is at most q-1. I am going to look at some specifics below.


You can access my gsp file here to reference or play with throughout this discussion that follows.

First, let's look at a fraction with a prime denominator and its decimal expansion: . We will consider the digits of the decimal expansion, when taken as pairs, as coordinate pairs. We will then plot them in a coordinate plan and investigate what we end up with. So, we will first start with (1,4) then (4,2) then (2,8) and so on.

The first thing that I noticed upon doing this is that there was a pattern in the location of the points. More formally, pairs of points shared a common slope. To go from J to K, you go to the right 3 and down 2. However, this is the same way that you get from N to M. To go from K to O, you go to the right 3 and down 1, the same path as going from L to N. You can also see that the location of the points is reversed. The steeper slope (from J to K) is on the left on the bottom set of three points where the steeper slope (from N to M) is on the right in the top set of three points.

What is even neater is that (with the help of a tool in GSP) you can create a ellipse through these 6 points. The tool only requires 5 points and each time, regardless of which 5 points you choose, the ellipse will go through the 6th point.

Even more, we can take two digits at a time and plot the series of points again as defined by the decimal expansion. So, this time, I will take (14, 28) then (28, 85) and so on. Yet again, we can make an ellipse through any 5 points that will go through the 6th point.


Then, I wanted to try another prime number in the denominator to see if the same property held. I chose 13. . This again has a period of 6, a main reason why I chose it. With that, I was hopeful that it would work again. So, I plotted the points and was immediately concerned with what I saw.

From the arrangement of the points, I was sure that there was no way that an ellipse would go through the points. There was no pattern among the points either. I went ahead and tried a variety of the 5 points to make an ellipse with the tool but had no luck.


So, I quickly moved on to another rational number. I chose 17 as my prime denominator this time. So for my decimal expansion I got . The period is 16. Though it is much more than 6, I went ahead with my investigation and plotted the points.

It appeared very busy to me at first. But upon closer inspection, I became more optimistic. I began to see patterns in it just like in the the ellipse. There were common slopes, reversed order, and points that lied remotely in lines. So, I began to try creating my conic through 5 points, mostly at random. At first, I was unsuccessful. But then, I noticed a pretty important pattern in the location of the points. In each of the four "lines" of points, there were three points in each "line" that actually did lie in a line, and 4 points in the middle two "lines". In fact, each line shared the same slope, 2. With that, I knew that I could not choose three points that would lie on a line since an ellipse could not be contained within a line. Basically three points could not simultaneously lie on a line and a curve. So, I turned my attention to the two points that did not lie on the lines. By choosing those two points and the two points right beside them, I was able to find the magic combination of points that would yield both ellipses and hyperbolas through the plotted points from the decimal expansion. The points I chose are below in yellow.

I also found that many other combinations worked as long as the first 4 points chose were symmetric (I do not know if that is a good way to describe it but the points should be corresponding). There are occasional instances where this does not hold but that occurs when 3 of the 5 points chosen lay in a line. I would be particularly useful for the reader to open the gsp now and try to create the various conics and observe the pattern.

So, we have looked at three different fractions with prime denominators. For two of them, I was able to identify ellipses/ hyperbolas within points plotted from their decimal expansion. But for one of them, I was not able to do so. My speculation as to why this is so goes back to the length of the period, Fermat's little theorem, and a new vocabulary word: cyclic number. A cyclic number occurs when the period of the repeating decimal for a rational number with 1 in the numerator and a prime number p in the denominator is equal to the most possible, p-1. In my three choices above, I chose two rational numbers whose decimal expansion contained cyclic numbers and one that did not. These corresponded to the rational numbers that contained ellipses/ hyperbolas when graphed. A property of cyclic numbers that I believe promotes this behavior is that when you multiple cyclic numbers by integers 1, 2, ... , p-1, you get the same digits of the cyclic number just rotated. For instance, .142857 is a cyclic number. 2 x .142857 = .428571. You can see that the digits just rotated, the first digit of the cyclic number became the last digit when the cyclic number was multiplied by 2. Thus, I believe that the rotational symmetry that lies within the plotting of the points for cyclic numbers is the secret to being able to create a conic that goes through 6 of the points.