# Fractions and Decimals

This page is about converting a fraction (i.e. a ratio of two numbers, also called a rational number) into a decimal fraction and the patterns that occur in such a decimal fraction. It is interactive and you can use the calculators on this page to investigate fractions for yourself to many decimal places. No special knowledge beyond decimals and division is required.
The calculators on this page require JavaScript but you appear to have switched JavaScript off (it is disabled). Please go to the Preferences for this browser and enable it if you want to use the calculators, then Reload this page.
The icon means there is a Things to do section of questions to start your own investigations. The calculator icon indicates that there is a live interactive calculator in that section.
Some but not all of the Calculators on this page are combined into a single Calculator on Fractions - Decimal Calculator .

## Changing a Fraction into a Decimal number

Converting a fraction to a decimal is just a division operation. So the fraction 1/2 means 1÷2.
When we do the long division (or use a calculator!) we find 1÷2=0·5. This fraction was easy - just one digit and we are done.

### Some examples and patterns

People have always been fascinated by the patterns in decimal fractions, trying to find the order in the seeming chaos and intrigued by the sequences.

When we make a table of the first few reciprocals of the numbers 2,3,..., that is when we turn the whole numbers upside down: from 2=2/1, 3=3/1, 4=4/1,... to 1/2, 1/3, 1/4, ... we get the following:

StoppingEndless
1/2 = 0.5
1/3 = 0.3 3...
1/4 = 0.25
1/5 = 0.2
1/6 = 0.16 6 6...
1/7 = 0.142857 142857...
1/8 = 0.125
1/9 = 0.1 1...
1/10 = 0.1
1/11 = 0.09 09 ...
1/12 = 0.08 3 3...
1/13 = 0.0 769230 769230...
StoppingEndless
1/14 = 0.0 714285 714285...
1/15 = 0.06 6 6...
1/16 = 0.0625
1/17 = 0.0588235294117647 0588....
1/18 = 0.05 5 5...
1/19 = 0.052631578947368421 0526...
1/20 = 0.05
1/21 = 0.047619 047619...
1/22 = 0.045 45 45...
1/23 = 0.0434782608695652173913...
1/24 = 0.0416 6 6...
1/25 = 0.04

### Three types of decimal fractions

1. In the table we can see that some decimal fractions stop after a few decimal places - those in the left-hand columns - such as 1/2, 1/4, 1/5, 1/8.
These are called terminating decimals.
2. But others become an endlessly repeating cycle of the same digits - those in the right-hand columns - such as 1/3, 1/6, 1/7.
These are called recurring (or repeating) decimal fractions. These recurring fractions are of two kinds:

1. Some decimal fractions are solely a collection of digits that repeat from the beginning, such as 0.3 which is just 3 repeating for ever and 1/7 which is 142857 endlessly repeated.
These are called purely repeating decimal fractions
2. Others start off with a fixed set of digits before they too eventually settle down to an endless repetition of the same digits, such as
1/6 = 0.1666666...
which begins 0.1 and then cycles 6 indefinitely
1/12 = 0.0833333...
which starts 0.08 before it too starts to repeat 3 for ever.
These are also called mixed recurring decimal fractions.

At first it is surprising that every fraction fits into one of these two categories:

The decimal fraction of every proper fraction is either terminating or else it becomes recurring.

To see why we have just two types of decimal fraction: terminating or repeating, think about what happens when you try to compute n/d as a decimal fraction: d ÷ n.
Here is the division process for 1/4 and 1/6:
 1/4 = 1 ÷ 4 . 2 5 4 ) 1 . 0 0 8 2 0 2 0 0

 1/6 = 1 ÷ 6 . 1 6 6 ) 1 . 0 0 0 6 4 0 3 6 4 0 ...
Two things can happen in this process:
either at some stage d divides exactly into a number in the division process
and so the division stops because the remainder is 0.
We have a terminating decimal fraction as in 1/4 above.
1/4 = 0.25
or we find a remainder which is the same as an earlier remainder.
so the division process would continue with the same divisors and remainders as when we first found that remainder and then this cycle would repeat endlessly.
We have found a repeating cycle as in 1/6 above.
1/6 = 0.16666666....
Note that we must stop OR else get into a cycle because when we divide by d there are only d different remainders: 0, 1, 2, ..., d-1 so after at most d-1 places, we will find an earlier remainder is repeated and then we have a cycle.
When we find a repeating cycle, it depends if the repeating remainder was the same as the first remainder in which case we have a purely repeating cycle, or if it was a later remainder that was repeated, after some fixed number of digits before the repeating part.

We could simplify this even further by saying that all terminating decimals end with the infinite cycle of 000000... so that every proper fraction is a recurring decimal !

### Patterns in recurring decimals

If we take all the fractions with the same denominator, that is, the lower number in a fraction, we can find some amazing patterns too. The first and simplest are the sevenths, the ninths and the elevenths:
 1/7 = 0.142857 142857 142857 ... 2/7 = 0.285714 285714 285714 ... 3/7 = 0.428157 428157 428157 ... 4/7 = 0.571428 571428 571428 ... 5/7 = 0.714285 714285 714285 ... 6/7 = 0.857142 857142 857142 ... 1/9 = 0.1111111... 2/9 = 0.2222222... 3/9 = 0.3333333... 4/9 = 0.4444444... 5/9 = 0.5555555... 6/9 = 0.6666666... 7/9 = 0.7777777... 8/9 = 0.8888888... 1/11 = 0.0909090909... 2/11 = 0.1818181818... 3/11 = 0.2727272727... 4/11 = 0.3636363636... 5/11 = 0.4545454545... 6/11 = 0.5454545454... 7/11 = 0.6363636363... 8/11 = 0.7272727272... 9/11 = 0.8181818181... 10/11= 0.9090909090...

### Notation for the recurring part of a decimal fraction

Mathematicians use one of two common notations to indicate which of the digits in a decimal fraction are in the repeating part: the period or cycle.
1. a dot is put over the first and last digits in the recurring sequence
This notation goes back at least to Robertson (1768).
2. a line is drawn over the repeating part
Both of these are a little awkward on web pages and as the output from computer programs and calculators, so an alternative is also used:
1. enclose the recurring part inside [ and ] brackets

For example:

1/7 = 0·142857 142857 14..=
 0· 1 4 2 8 5 7
=
 0· 142857
= 0·[142857]
3/44 = 0·06 81 81 81 81...=
 0· 0 6 8 1
=
 0· 0 6 8 1
= 0·06[81]
11/30 = 0·3 6666666... =
 0· 3 6
=
 0· 3 6
= 0·3[6]
1833÷5000 = 0·3666 is a terminating decimal fraction
183÷500 = 0·366 is a terminating decimal fraction
9÷25 = 0·36 is a terminating decimal fraction

#### Things to do

Here is a question to test your understanding of the bracket notation:
1. Which of these decimal fractions is not the same as 0· 123 123 123 ...? [Press the button to check your answer.]:
1. This is 0. 123 123 123 123 ...
2. This is another way of writing 0. 123 123 123 123 ...
3. This is 0. 1 231 231 231 231 ... which is the same decimal fraction.
4. Well done - correct! This is 0. 1 23123 23123 ... and is not the same as 0. 1231231231231...
5. This is 0. 12 312 312 312 ... which is the same decimal fraction.

#### Alternative forms for some recurring fractions

We have just seen that there is no unique way for writing a recurring fraction since 0.[123] = 0.1[231] = 0.12[312] = ...
We could choose one of two conventions: use the longest fixed part or use the shortest fixed part.
For our number example here, it makes sense to write it as 0.[123] but in other cases where the period begins with 0 we have other choices.
For instance, 1/11 = 0.0909090909... .
• With the shortest fixed part (this is the usual form), we have: 1/11 = 0.[09] which makes it a purely recurring decimal fraction.
• Others (such as used in the Mathematica as results from the RealDigits function) prefer to use the longest fixed part and to start a recurring part with a non-zero digit:
1/11 = 0.0[90], making this a mixed recurring decimal fraction.

On this page, we use the shortest fixed part for all recurring decimals.

People have suggested that all fractions are recurring ones because they all end with 000000... or they can end with 99999999... . And anyway, is 0.499999... the same as 0.5 = 0.5000000... or not?
The answer is "Yes, they are the same!" but here is a longer explanation if you need more convincing...

Let's examine these two special periods, [0] and [9]:-
Aren't all fractions recurring?
• Argument 1:
Since 1/2=0·5 is exactly the same as 0·50000000... you could say that 1/2=0·5[0]. This will also apply to every terminating decimal fraction. So can't we say that all terminating fractions are just recurring ones with a period of [0]? Yes, we can!
But mathematicians always ignore this special period of just zeroes and just say that "the decimal terminates" because they choose to write the number as a finite collection of decimal digits rather than an infinite one when there is a choice.
• Argument 2:
Since 0.49999999... or 0.4[9] is indistinguishable from 0.5 because the series of 9's never ends, we have another way in which all terminating decimals may be written as recurring ones - always replace the last non-zero digit, D, of a terminating decimal fraction by D-1 followed by a recurring period of 9's.
for example 1/8 = 0·125 = 0·1249999999...
Again, this reasoning is correct.
Mathematically though, we do not use a period of [9] in our decimal fractions but again choose to write it as a finite sequence of digits wherever possible (i.e. so that it terminates).
It's really a matter of taste as both arguments are correct.
Such decisions are made, choosing one as the preferred method, so that we can all conveniently talk the same mathematical language. These choices are called conventions.
The same is true when deciding on which side of the road to drive. It is a convention in the UK that we drive on the left, but the convention in France is to drive on the right. So long as you go with the convention when driving in Britain and go with the other convention when in France, then there is no problem. But make sure you know which convention is being used in any other country!

#### Things to do

[This calculator can give as many decimal places as you like, unlike an ordinary hand-held calculator which often only gives you 8 or perhaps 12 decimal places.]
1. Convert the following fractions to decimals: 1/7, 2/7, 3/7, 4/7, 5/7, 6/7.
What do all the 6-digit cycles of these 7th fractions have in common ?
They all have the same six digits in their repeating part, starting at different points in the cycle:
1/7 = 0.[142857]
2/7 = 0.[285714]
3/7 = 0.[428157]
4/7 = 0.[571428]
5/7 = 0.[714285]
6/7 = 0.[857142]
2. Is this true of the eigths? Try all the fractions from 1/8 to 7/8. No!
3. Find another number, N, all of whose decimal fractions 1/N, 2/N, 2/N, ... are made from the same cycle of digits as we found for 1/7.
Hint: there are two more with N < 20
n/17 has a period of 16 digits all of which are in the same cycle as
1/17 = 0.[0588235294117647]
Similarly n/19 with the cycle being
1/19 = 0.[052631578947368421]

#### Fraction to Decimal Calculator

C A L C U L A T O R
Fraction to Decimal

 decimal places
Show periods as 123 : or [123]:

R E S U L T S

## Converting a decimal fraction into a proper fraction

### Converting a terminating decimal to a fraction

First let's look at a method of converting a decimal fraction to a proper fraction by hand. This illustrates the maths behind the process. Then we can explore with an online calculator to do it for us!
For example, 0.25:
0.25 =
 2 10
+
 5 100
=
 25 100
=
 1 4

The process is to write the fraction as a whole number divided by 10the number of decimal places and then simplify this fraction until it is in its lowest form.

### Converting a periodic fraction to a fraction

If the decimal fraction is periodic then it never ends and we need a different approach.

#### A purely periodic decimal fraction

First, let's take a purely periodic fraction such as 0.[037] = 0. 037 037 037 .... Let's call our decimal fraction d.
First we multiply d by 10the length of the PERIOD to make the fractional part of the decimal (to the right of the decimal point) the same as the original number. For this example, we would use 103 since the period is of length 3:
103 d = 37.037 037 037 ...
Now, if we subtract the original number form this the part to the right of the decimal point will disappear:
 103 d = 37 .037 037 037 ... – d = 0 .037 037 037 ... 103d – d = 37 .000 000 000 ... (103 – 1) d = 37 d = 37/999 d = 1/27
The process is to multiply the purely periodic decimal by 10length of the period, subtract the original from this and then divide to form a fraction.

#### A mixed periodic decimal fraction

If the decimal fraction is mixed, we use a combination of the terminating and purely periodic methods.
For example, 0.12[037] = 0.12 037 037 037 037.... Let's call this m.
First, multiply m by 10length of the FIXED part to get a purely periodic fraction. The power to use here is 2:
100 m = 12.037 037 037 ... and so:
100 m = 12 + 0.[037]
Then use the purely periodic fraction method above on this value to find 100 m as a fraction:
100 m = 12 + 1/27
Now find a proper fraction that is the value of m:
100 m = 12 + 1/27
100 m = (12×27 + 1)/27
100 m = (324 + 1)/27
100 m = 325/27
m = 325/2700
m = 13/108
The calculator in the next section does all the arithmetic using the same methods as above.

### Decimal to Fraction Calculator

You can input a decimal fraction and the calculator will convert it to a proper fraction. Give the fixed part (if it has one) followed by the recurring part (if your decimal fraction is not a terminating one).
• If your decimal fraction is a terminating fraction such as 0·12, type the digits 12 into the FIXED part, leaving the RECURRING part empty.
• If your decimal fraction is purely recurring as in 0·037 037 037.., type the digits that repeat (in this example it is just 037) into the RECURRING part leaving the FIXED part empty. Don't forget to type in all initial and trailing zeroes.
• If your decimal fraction starts with a fixed part and is followed by a recurring part, as in 0·12[037] = 0·12 037 037 ... then put 12 into the fixed part and type 037 into the box for the recurring part.
THEN press the button to see the conversion in the RESULTS area.
C A L C U L A T O R
Decimal to Fraction
 0· FIXED part RECURRING part
R E S U L T S

### Things to do

1. Can you find a fraction which is all 1's: 0.[1]=0.111111...?
1. Can you find a fraction which is all 2's: 0.[2]=0.222222...?
Looking at the result from the Calculator, how could you have got this without using the Calculator>
2. Without using the calculator, what fraction is 0.[3]=0.3333...?
3. ... and what is 0.[4]=0.44444...?
2. Can you find a fraction which repeats your age (e.g. 0.[14]=0.14 14 14 14 14... )?
1. What fraction will it be on your next birthday?
3. Can you find a fraction which is your birthday? e.g. for 5 January 1985 you might try 0.05 01 1985 or 01 05 1985 if you prefer the American system of writing dates
4. Can you... find a fraction which is 0.123456789?
5. By stopping any long fraction after a few decimal places, we can find a fraction that approximates the original one.
For instance π is 3.1415926535....
1. What is 3.1 as a fraction?
2. What is 3.14 as a fraction?
3. What about 3.141 and 3.142 if we round to 3 dps?
In fact, 22/7 = 3.1428.. is better than all those above so using just the first few decimal places to make a fraction is not always the best way to get a good fraction as an approximation.
For a much better way see my page on Continued Fractions

## Which decimal fractions terminate and which recur?

### How to tell if a fraction is terminating as a decimal fraction

Some experimentation will help answer this question but we will also justify our answers mathematically.
Use the Fraction to Decimal calculator above to find all the fractions which have a denominator less than 50 and whose decimal fractions terminate.
Your list should begin with 2, 4, 5, 8, 10, 16, 20 because:
1/2 = 0·5, 1/4 = 0·25, 1/5 = 0·2, 1/8 = 0·125, 1/10 = 0·1, 1/16 = 0·0625, 1/20 = 0·05
All these fractions stop after a limited number of digits: they terminate.

Can you... spot the pattern that is common to the numbers 2, 4, 5, 8, 10, 16, 20, ...?
Try looking at their prime factors.
All the numbers have 2 or 5 or both as their prime factors and no other prime factors.
They are the numbers 2a×5b for whole numbers a, b ≥ 0.

See if you can find some more numbers, N, whose unit fractions, 1/N terminate and then check your list with A003592.

#### How to find the length of a terminating decimal fraction

If the proper fraction n/d is in its lowest terms then it terminates if and only if d is divisible by 2 or by 5 or by both and is not divisible by any other prime number.
This is because in the process of dividing d into n by long division, some power of 10 will then be an exact multiple of the denominator and so will leave no remainder and our process of long-division will stop.
We can write this as d = 2α × 5β where α and β are whole numbers but may be 0.
The decimal fraction for n/d has LCM(α, β) decimal places where the LCM(α, β) function means the lowest common multiple of both α and β; the smallest number that is a multiple of both α and β.

The list of denominators with terminating decimals begins:

2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, ... A003592

### How to tell if a fraction is purely recurring as a decimal fraction

The rule for a fraction which is purely recurring, that is, its period starts immediately after the decimal point, is just the opposite of the rule for detecting a terminating fraction above:
The fraction n/d, in its lowest terms, is purely recurring if and only if neither 2 nor 5 are factors of d
n1/nPeriod
length
n is
Prime?
30.31Prime
70.1428576Prime
90.11not Prime
110.092Prime
130.0769236Prime
170.058823529411764716Prime
190.05263157894736842118Prime
210.0476196not Prime
230.043478260869565217391322Prime
270.0373not Prime
290.034482758620689655172413793128Prime
The first column is 3, 7, 9, 11, 13, 17, ... A045572 which can be described in several equivalent ways as:
• the numbers coprime to 10
• the numbers with no prime factor in common with 10
• the numbers n for which GCD(10,n) = 1
• the numbers which are not divisible by either 2 or by 5
The third column is the lengths of all the purely periodic decimal fractions: 1, 6, 1, 2, 6, 16, 18, 6, ... A002329. There is no explicit formula for this series but we can describe it with more detail as we see in the next secion.

Did you notice that all the primes numbers are in this list, except of course 2 and 5?
Also, the length of the period of 1/n when n is such a prime is sometimes n–1 and sometimes not! Can you spot any patterns in the period length for a prime n?

#### The length of the period of a purely periodic decimal fraction

When we divide n into 1 and we eventually reach a remainder of 1 again, then the decimal fraction will repeat. At this point, for example, we have the following if we are using long division to find the decimal fraction for 1/21:
. 0 4 7 6 1 9 21 ) 1 . 0 0 0 0 0 0 8 4 1 6 0 1 4 7 1 3 0 1 2 6 4 0 2 1 1 9 0 1 8 9 1
The division of course is equally correct if we ignored the decimal point so that we would be calculating just with whole numbers. In that case, we have found that 1 followed by six zeroes, 106, when divided by 21, leaves a remainder of 1. That is:
106 = 47619 × 21 + 1 or:
106 - 1 is divisible by 21
The length of the recurring part of a purely periodic decimal fraction
is the smallest power of 10 that leaves a remainder of 1 when divided by the denominator.
The decimal form of a fraction is purely recurring if and only if the denominator does not have either 2 or 5 as a factor.
In the same way that we write n / d to mean n divided by d we can also write n mod d to mean just the whole number remainder when we divide the integer n by the integer d.
13 / 5 = 2.6 = 23/5
13 mod 5 = 3
mod is used only between whole numbers so the possible remainders "mod n" are 0, 1, 2, 3, ..., n-1 but also sometimes it is useful to use negative remainders -n+1, -n+2, ... -1, 0 or some other set on n-1 integers.
Another definition of a mod b = r is b divides into (is a factor of) a – r.
mod looks like the other arithmetic operations such as +, –, ×, / in that it goes between the two numbers it "operates" on.

You will often see an alternative notation in maths books, where two numbers a and b are congruent or equivalent (≡) if, when divided by a given number, the modulus n , they have the same remainder:
a ≡ b (mod n):

13 ≡ 3 (mod 5)
This is a little more general than the mod operator notation whose result is the remainder whereas this notation means that the two numbers have the same remainder when divided by the modulus, the number in the brackets.
13 mod 5 = 2 or 13 ≡ 2 (mod 5)
27 mod 5 = 2 or 27 ≡ 2 (mod 5)
⇒ 13 ≡ 27 (mod 5)
The equivalence is also called a congruence and the "mathematics of remainders" is called the Theory of Congruences or Modular Arithmetic. For instance, we can add and subtract congruences and multiply them too:
If a ≡ A (mod n) and b ≡ B (mod n) then:
a + k ≡ A + k (mod n);
a + b ≡ A + B (mod n);
a – b ≡ A – B (mod n);
a × b ≡ A × B (mod n);
k a ≡ k b (mod n)
but we must be careful about division since although
6 ≡ 12 (mod 6) but, dividing by 2:
3 ≡ 6 (mod 6) is wrong!

In terms of lengths of recurring parts of decimal fractions:
"The order of 10 mod 7" gives the length of the recurring part of decimal (base 10) fractions with denominator 7. This means the smallest power of 10 which, when divided by 7, leaves a remainder of 1.
101 ÷ 7 = 1× 7 + 3 so has remainder 3: 101 ≡ 3 (mod 7)
102 ÷ 7 = 14×7 + 2 so has remainder 2: 102 ≡ 2 (mod 7)
103 ≡ 6 (mod 7)
104 ≡ 4 (mod 7)
105 ≡ 5 (mod 7)
106 ≡ 1 (mod 7)
So fractions with denominator 7 are periodic with 6 digits in the period.
Note:

• this is only if the fractions is reduced since 14/7 = 2 and has no recurring part!
• it only applies to certain fractions since 3/8 = 0.375 and has no recurring (periodic) part.

Modular arithmetic has many important applications in modern Number Theory. The great mathematician Carl Friedrich Gauss (1777 - 1855) was the first to fully develop this topic and show its power in his book Disquisitiones Arithmeticae written in Latin. See the References at the foot of this page for the English translation in paperback.

Here we have found that

106 mod 21 = 1
and that 6 is the smallest power of 10 that leaves a remainder of 1 when divided by 21.

The same is true for all fractions 1/n which have purely periodic decimal fractions.
Often in textbooks you will see the Greek letter λ (lambda) used for this length:

If λ is the smallest power of 10 that leaves a remainder of 1 when divided by n, then there are λ digits in the period of 1/n:
λ is the smallest number for which 10λ mod n = 1
The list of denominators of purely periodic fractions begins:
3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, ... A045572

### Mixed Recurring Fractions

All fractions as a decimal will either terminate or recurr. Some recurr from the first decimal place and are the purely recurring decimal fractions of the previous section. Others have a few decimal digits at the start and then they recurr. These are the mixed recurring decimal fractions that we look at in this section.
For the fraction n/d, in its lowest terms, to terminate have seen that the prime factors of d must also be prime factors of 10, namely 2 or 5 or both.
Examples are: 2, 8 = 2×2×2, 40 = 2×2×2×5, 100 = 2×2×5×5

For it to be purely recurring, none of the prime factors of d must be a prime factor of 10.
Examples are: 3, 7, 9 = 3×3, 11 and all the other prime numbers bigger than 5.

So that leaves the mixed recurring decimal fractions which have at least one prime factor in common with those of 10 and at least one not in common with those of 10
Examples are 6 = 2×3, 15 = 5×3, 30 = 2×5×3
These denominators are of the form

d = 2α1 5α2 p1β1 p2β2 ...
where the pi are prime numbers other than 2 and 5 and α1 or α2 can be 0 (which effectively excludes that prime as a factor).

#### How long are the fixed and recurring parts of a mixed recurring fraction?

Using the above description of the denominator d, we separate its factorization into two parts, so that
d = D × E
where D includes only the prime factors 2 and/or 5
or else is 1 and
E is the rest of the factorization for the other prime factors
or else is 1.
D = 2α1 5α2 and the other primes and their powers are all included in E = d / D

The size of the fixed and recurring parts are determined solely by D. 1/D will be therefore be a terminating decimal fraction and the number of decimal places it has is the size of the initial fixed part of reduced fractions with d as the denominator.
The size of the recurring part is determined by the rest of the factorization of the denominator, E.
1/E will be purely recurring and the length of its period is the same as the length of the recurring part of 1/d.

Let's look at some examples:

• 1/12
12 = 22 × 3 so D = 22, E = 3
The fixed part is determined by D = 22 = 4 and 1/4 = 0.25 has 2 decimal digits.
The recurring part is determined by E=12/4=3 and 1/3 = 0.[3] has a recurring period of length 1. We see that 1/12 = 0.08[3] and does indeed have a fixed part of 2 digits and a recurring part of 1 digit.
• 1/38
38 = 2 × 19 so D = 2, E = 19
The fixed part is the same length as 1/D = 1/2 = 0.5, 1 digit.
The recurring part is the same length as 1/E = 1/19 = 0.[052631578947368421], 18 digits.
Check: 1/38 = 0.0[263157894736842105] does have a fixed part of 1 digit and a recurring part of 18 digits.
• 1/19250
19250 = 2 × 53 × 7 × 11 so D = 2 × 53, E = 7 × 11
The fixed part is given by D = 2 × 53 = 250 and 1/250 = 0.004 has 3 decimal digits.
The recurring part is determined by the rest of the factorisation: E = 7 × 11 = 77 and 1/77 = 0.[012987] has a recurring period of length 6.
We find that 1/19250 = 0.000[051948] and does indeed have a fixed part of 3 digits and a recurring part of 6 digits.
Below there is a calculator which will find denominators or reduced fractions for given lengths of fixed and/or recurring parts.

The denominators of fractions with purely recurring decimals are:

3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31 ... A045572
The denominators that have decimals that eventually recur, either as purely recurring decimals or else as mixed recurring decimals are those which do not have a terminating decimal expansion:
3, 6, 7, 9, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 27,... A085837

### Fractions with the same denominator

We have mainly looked at 1/n up to now and how many decimal places it has and if it is periodic or not. What can we say about k/n?
Some examples are:
nn/5Decimal
11/50.2
22/50.4
33/50.6
44/50.8
nn/6Decimal
11/60.1[6]
21/30.[3]
31/20.5
42/30.[6]
55/60.8[3]
nn/8Decimal
11/80.125
21/40.25
33/80.325
41/20.5
55/80.625
63/40.75
77/80.875
nn/12Decimal
11/120.08[3]
21/60.1[6]
31/40.25
41/30.[3]
55/120.41[6]
61/20.5
nn/12Decimal
77/120.58[3]
82/30.[6]
93/40.75
105/60.8[3]
1111/120.91[6]
It looks as if the numerator does not matter but that it is only the denominator of the fraction in its lowest terms that matters - and indeed this proves correct!
The character of the decimal fraction - whether it terminates or not and the lengths of the fixed and recurring parts - is solely determined by the denominator provided the fraction is in its lowest terms.

The rules for decimal (base 10) fraction for 1/d in its lowest form

The decimal fraction terminates if and only if
the only prime factors of d are 2 or 5 or both.
The decimal fraction is purely periodic (its period begins immediately after the decimal point) if and only if
neither 2 nor 5 are factors of d.
The decimal fraction has an initial number of non-repeating decimal places and then is periodic if and only if
d has both a prime factor which is a prime factor of 10 and a prime factor which is not a prime factor of 10

Here are the mathematical details (optional) to show why the numerator does not matter:

For n/d we look at
 n d
,
 10 n d
,
 100 n d
, ...
If n/d terminates, then eventually 10k n will be divisible by d.
This only happens if the prime factors of d are also prime factors of 10.
If n/d is in its lowest terms then, since d has no factor in common with n, d will divide only into a power of 10, no matter what the value of n is.

If n/d eventually becomes periodic, then we find a remainder when dividing by n by d is equal to one found earlier. This is because in this case we do not find an exact division and the remainders can only be 1, 2, 3, ... , d-1 and therefore after at most d decimal places, we must find a remainder being repeated.
Suppose the remainder first repeated is 10sn and is again found at 10s+tn.
We can write
10sn ≡ 10s+tn (mod d)
But since n and the modulus d have no factor in common (the fraction n/d is in its lowest terms), then we can divide this equivalence by n:
10s ≡ 10s+t (mod d)
The start of the period - after s initial decimal places - and the length of the period - t decimal places - are therefore independent of n.

For example: 13/108:

.1 2 0 3 7 ... 1 0 8 ) 1 3.0 0 0 0 0 ... 1 0 8 2 2 0 2 1 6 4 0 0 4 0 0 3 2 4 7 6 0 7 5 6 4
So we see that 1300 ÷ 108 has the same remainder 4 as 1300000 ÷ 108 . Checking this:
1300 = 12×108 + 4 : check!
1300000 = 12037×108 + 4 : check!
Using congruences, we can write this as:
13 102 ≡ 13 105 (mod 108) and, since GCD(108,13)=1,
102 ≡ 105 (mod 108) :checking:
100 = 0×108 + 100
10000 = 925×108 + 100 : check!
For example:
13/108 has an initial fixed part of 2 decimal places and a periodic repeating part of 3 dps and so will all decimal fractions for n/108 provided that n has no factor in common with 108:
n/108lowest
terms
Decimal
1/1081/1080.00[925]
2/1081/540.0[185]
3/1081/360.02[7]
4/1081/270.[037]
5/1085/1080.04[629]
6/1081/180.0[5]
7/1087/1080.06[481]
8/1082/270.[074]
9/1081/120.08[3]
10/1085/540.0[925]
n/108lowest
terms
Decimal
11/10811/1080.10[185]
12/1081/90.[1]
13/10813/1080.12[037]
14/1087/540.1[296]
15/1085/360.13[8]
16/1084/270.[148]
17/10817/1080.15[740]
18/1081/60.1[6]
19/10819/1080.17[592]
20/1085/270.[185]
n/108lowest
terms
Decimal
21/1087/360.19[4]
22/10811/540.2[037]
23/10823/1080.21[296]
24/1082/90.[2]
25/10825/1080.23[148]
26/10813/540.2[407]
27/1081/40.25
28/1087/270.[259]
29/10829/1080.26[851]
30/1085/180.2[7]

#### Same denominator Decimal Fraction Calculator

This calculator finds all those fractions with the same denominator and counts them, displays all the numerators or shows the all the decimal places or the period. The denominator can be a number up to 16 digits long and the Count is displayed but you will need to confirm you want to see all the numerators or decimals if there are more than 50 numerators.
C A L C U L A T O R
 Same denominator Decimal Fractions fractions with a denominator of Show periods as 123 : or [123] :

R E S U L T S

#### The number of fractions with the same denominator and Euler's Totient function φ(n)

The Calculator above computes the number of fractions with the same denominator by using a relatively simple formula which is why it is so fast. The number of fractions with the same denominator d is an important function in mathematics and in Number Theory in particular. Euler used it in his research and called it φ(d), the (Euler) Totient function. It has nothing to do with the golden mean number φ as that is a completely different use for the Greek letter phi!
Euler's phi function φ(d) is
the number of fractions 0 < n/d < 1 which in their lowest form have d as their denominator.
Here is a table of the number of proper (reduced) fractions with a given denominator d or φ(d):
 d φ(d) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 2 4 2 6 4 6 4 10 4 12 6 8 8 16 6 18 8
After φ(2)=1, all the values are even.
This is the series A000010, the totient numbers and it plays an important part in many results in Number Theory.
Another mathematical description of φ(d) is
Euler's phi function φ(d) is
the number of integers between 0 and d that have no factor in common with d
φ(d) = # { 0<n<d | GCD(n,d)=1 }
Sometimes it is called Euler's totient function but always written as φ(d).

Euler found some very important properties of φ(d) that lead to a quick and efficient method of computing φ(d) for large d:

φ(d) = d – 1 when d is prime.
If d is prime then all numbers lower than it, from 1 to d – 1, have no factors in common with it.
φ(d) is multiplicative.
e.g. φ(3)=2, φ(5)=4 φ(15)=8
If we take 2 primes such as 3 which by the result above has 2 numbers with no factor in common with it, and similarly, if there are 4 numbers with no factor in common with 5 then there will be 2×4 numbers with no factor in common with 3×5:
because the multiples of 3 will not overlap with the multiples of 5 for numerators less than 3×5=15.
This generalizes to any pair of numbers with no common factor:
If gcd(a,b)=1 then φ(a b) = φ(a) φ(b)
φ(pα) = pα – pα–1 = pα–1(p – 1) = pα–1 φ(p) if p is prime.
When the denominator is a power of a prime then the only numerators that will have a factor in common with it are just the multiples of the prime: p, 2p, 3p, .., p2, ... pα-p, pα and there are pα–1 of these. Hence
φ(pα) = pα – pα–1
φ(nα) = nα–1 φ(n) for all n
This follows because φ(n) is multiplicative and from the previous property.
φ(p1α1 p2α2 ... pkαk) = φ(p1α1) φ(p2α2) ... φ(pkαk) for primes pi
This looks daunting but it merely means that we split a number into its separate prime factors pi with their powers αi and find the φ count for each of these piαi, using the previous property, then, since all the primes have no factors in common, we can multiply them all using the multiplicative property!

#### Nontotient Numbers

All values of φ(n) are even for n>2. But not all even numbers are the result of φ(n) for some n.
In other words when we list the counts of proper fractions with a given denominator, there are some counts that never appear in the list and these are the nontotient numbers. For instance,
we can find n for φ(n) = 12, since φ(13) = 12 and there are 12 proper fractions less than 1 with a denominator of 13.
Similarly, φ(n) = 16 since φ(17) = 16 and there are 16 proper fractions less than 1 with a denominator of 17.
But there is no solution to φ(n) = 14: there is no denominator that has exactly 14 reduced fractions!
14 is the smallest nontotient number.
The list begins:
14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98, ... A005277.

### Fractions with the same lengths of period, fixed part or terminating part

We have seen how to compute the length of the terminating part of of the fixed and periodic parts of a given fraction. Now let's ask the question in reverse:
Given the length of terminating part or the lengths of fixed and periodic parts, how do we find such fractions?

#### Terminating Decimals of a given length

A terminating decimal fraction n/d must have d = 2α × 5β ( α and β may be 0) and the length of its (terminating) decimal is LCM(α, β) which we saw above.
So, given a length t of a terminating decimal fraction we need to find α and β with LCM(α, β) = t. This means that both α and β are among the factors of t or else one of them is 0 and the other is t.
For example, if t = 2, we have
α2αβ5βd = 2α×5β1/d
01225250.04
12225500.02
240140.25
2415200.05
242251000.01
As a check, there are 99 decimals with just 2 decimal places, from 0.01 to 0.99, so the number of fractions in their lowest terms with the above denominators must sum to 99, you might think... but this is wrong! Why? Because 0.10 is not a terminating fraction of 2 digits but just 1.
We must exclude those 2-digit numbers that end in 0, leaving just 90 terminating fractions of 2 digits (decimal places).

#### Purely periodic decimals of a given length

A common notation used for the length of the period of the decimal for 1/d is the Greek lowercase letter for for length, which is lambda λ.
λ will be the smallest power of 10 that has a remainder of 1 when divided by d. If we are given a value for λ we want to find the d for which 10λ = 1 (mod d) which means that d will be a factor of 10λ - 1.
Here are the factors of 10λ - 1 for various values of λ = length of period:
λ10λ–1prime
factorisation
factors>1
found ealier
new factors>1
1932 3, 9
29932×113, 911, 33, 99
399933×373, 927, 37, 111, 333, 999
4999932×11×1013, 9, 11, 33, 99101, 303, 909,
1111, 3333, 9999
59999932×41×273, 941, 123, 271, 369, 813, 2439,
11111, 33333, 99999
699999933×7×11×13×373, 9, 11, 27, 33, 37, 99,
111, 333, 999
7, 13, 21, 39, 63, 77, 91, 117,
143, 189, 231, 259, 273, 297,
351, 407, 429, 481, 693, 777,
819, 1001, 1221, 11287, 1443,
2079, 10101, 10989, 12987,
15873, 25641, 27027, 30303,
37037, 47619, 76923, 90909,
111111, 142857, 333333, 999999
7999999932×239×46493, 9239, 717, 2151, 4649, 13947, 41841,
1111111, 3333333, 9999999
Some interesting facts arise from this table:
• If we find one of the factors d in row λ but not in any earlier row, then 1/d is purely periodic with a period of length λ.
• Any other fraction n/d with GCD(n,d)=1 will also have a period of the same length.
• The number of divisors of 10n–1 varies considerably (A070528 and this table includes the factor 1):  n #divisors 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 6 8 12 12 64 12 48 20 48 12 256 24 48 128 192 12 640 6 384
• For instance,
1023–1 has only 6 factors but
1024–1 has 2048
1030–1 has 16384
Here are three consecutive values of the power with wildly differing numbers of factors:
1059–1 has 12 factors but
1060–1 has 2097152 and
1061–1 has 384.
• This is because if m is a factor of n then 10m–1 is a factor of 10n–1.
So numbers n that have many factors will give rise to many factors for 10n–1
• All numbers 10n–1 for n>1 have at least these 6 factors: 1, 3, 9, (10n–1)/9 = 11..11, (10n–1)/3 = 33..33, (10n–1)/9 = 999...999
• These 6 factors are the only divisors for 102–1, 1019–1 and 1023–1.
• So, for n = 2, 19 and 23 the larger 3 factors will be their only denominators for purely recurring fractions with those period lengths.

#### Decimals of given fixed part length and period length

Let's call the fixed part length t and the period length and either may be 0.
Combining the results of the above two sections, we find all numbers T with terminating decimal of length t and all numbers R which are purely recurring with a period of length λ, as described above.
The mixed fraction denominators which have both fixed part length t and a period of length λ are those numbers made from a product of one of the T with one of the R.
From the sections above we see that
• the denominators of fractions whose decimal is only a fixed-part of F decimals are factors of 10F
• the denominators of fractions whose decimal is only a period of P decimals are factors of 10P−1
• the denominators of fractions whose decimal has both a fixed part and periodic part are a product of the denominators with just the fixed part and just the periodic part

#### Similar sized Decimals Calculator

The fixed length and period length cannot be larger than 15 with this calculator. Leave the 'up to' value empty to include all valid integers with up to 16 digits.
This Calculator finds the number of distinct denominators that can occur for decimal numbers with a given number of fixed-part decimal places and a given number of periodic-part decimal places.
For example, there are 9 distinct decimals of the form 0.d with 1 fixed decimal digit d>0 and no periodic decimals as follows:
0.1 = 1/10, 0.2 = 1/5, 0.3 = 3/10, 0.4 = 2/5, 0.5 = 1/2, 0.6 = 3/5, 0.7 = 7/10, 0.8 = 4/5, 0.9 = 9/10
but there are only 3 possible denominators for these fractions: 2, 5 and 10.
C A L C U L A T O R
 up to for decimals with fixed part of length and period of length show periods as 123 : or [123] :

R E S U L T S

#### Plots of Period lengths

Here are plots of the lengths of the periods of the purely periodic fractions 1/N for different ranges of N:

## Decimal fractions that look like special sequences

Now we look at some special kinds of decimal fractions, ones that contain a whole special series in their decimals! It is amazing to find that some fractions have a decimal expansion with a special pattern such as the powers of 2 as in
0.01 02 04 08 16 32 ....
which is the first few decimal places of 1/98! Can you guess which simple fraction begins with the powers of 3: 0.01 03 09 27 ... ?
How about 0.001 002 004 008 016 032 ...?

However after a few more decimal places the series often get "muddled" and the pattern seems to disappear.
Why? Are all series of numbers codeable as a fraction in this way? How can we find a fraction for a series?
This section unravels some of the simple maths behind this mystery.

### Powers of a number

If we look more closely at some simple fractions near 1/100 we see their decimal fractions are special:
 1/99 = 0. 01 01 01 01 01 01 01 01 01 1 ... 1/98 = 0. 01 02 04 08 16 32 65 30 61 2 ... 1/97 = 0. 01 03 09 27 83 50 51 54 63 9 ...
But 1/98 looks like 01 02 04 08 16 32 ... the powers of two and 98 = 100 - 2.
and 1/97 looks like 01 03 09 27 8(1)... the powers of three and 97 = 100 - 3.
In fact, even 1/99 fits this pattern because 99 = 100 - 1 and it would then be the powers of 1, that is 01 01 01 01 01 ... which it is!
But soon the pattern of powers disappears. Why?
Because it is really there, just masked as the powers get larger.....

#### Shift-and-add applied to the a series makes the fraction!

We take the powers of 2 but moving each power exactly 2 places to the right each time and then we add them:
 0. 0 1 + 0 2 + 0 4 + 0 8 + 1 6 + 3 2 + 6 4 + 1 2 8 + 2 5 6 + 5 1 2 + 1 0 2 4 + . . . 0. 0 1 0 2 0 4 0 8 1 6 3 2 6 5 3 0 6 1 . . . . . .
and we see this is indeed the start of 1/98 as a decimal.

Did you notice that

• the powers of 2 taken two digits at a time are in the fraction 1/(102 - 2) = 1/98
• the powers of 3 taken two digits at a time are in the fraction 1/(102 - 3) = 1/97
Any guesses as to a fraction whose decimals are the powers of 2 using three digits for each?

#### Things to do

1. Check this out with 1/97 = 1/(100 - 3) and the powers of 3.
Make a table, moving the unit digit two places to the right each time and adding. Check you have enough powers to verify the first 20 decimal places as we did for the powers of two above.
 30= 0. 0 1 + 31= 0 3 + 32= 0 9 + 33= 2 7 + 34= 8 1 + 35= 2 4 3 + 36= 7 2 9 + 37= 2 1 8 7 + 3... ... ... ... ... TOTAL:
2. To about 20 or 30 decimal places, what are 1/9980 and 1/9970?

So we observe (or guess!) that

the powers of p taken d digits at a time appear in the decimal fraction for 1/(10d–p)
A series of powers is called a geometric progression since each term is a constant multiple of the previous term.
In this example: a, a×b, a×b2, a×b3, ... we have a as the first term and b as the multiplier or common ratio.
We write the sum of the first n terms using the Greek capital letter sigma: Σ:
 ∞∑i = 0 a bi = a + a×b + a×b2 + a×b3 + ...
The sum of a geometric progression (G.P.) will exist provided -1 < b < 1 so that the terms converge to a limit, the sum.
The infinite sum - let's call it S - is easily calculated as follows:
Multiplying the sum by b gives:
b S = a×b + a×b2 + a×b3 + ... = S – a
a = S ( 1 – b)
S = a / ( 1 – b )
For our decimal sums, if we have powers of p and each power is shifted by k places, then we have
1 + p/10k + p2/102k + p3/103k + ...
where the common ratio is p/10k and the first term is 1. The sum has a limit provided that p/10k < 1, i.e. p < 10k.
Using the formula above for the sum of a G.P., the sum of all powers is
1 / (1 – p/10k) = 10k / (10k – p)
But notice that we began the sum at class=maths>1, so, to get class=maths>1 as the first term in our decimal fraction, we need to divide this fraction by 10k:
0.0001 000p 000p2 ... with k digits per power = 1/(10k – p)

#### The powers backwards!

At the top of this page, you might not have noticed among the examples of fractions converted into decimals this particular one:
1/19 = 0 . [052631578947368421]
It does not seem interesting except when you look at it backwards: ..., (1)6, 8, 4, 2, 1. Surely these cannot be the powers of 2 in reverse order and added, can they?
 1 2 4 8 1 6 3 2 6 4 1 2 8 2 5 6 5 1 2 1 0 2 4 . . . . . . . . 7 8 9 4 7 3 6 8 4 2 1
Indeed they can!
Here is another, this time the powers-of-2 ..., 32, 64, 32, 16, 8, 4, 2, 1 have first 2 and then 3 digits each:
1/199 = 0.[00502512562814070351...14572864321608040201] with a period of 99 digits,
1/1999 = 0.[00050025012506253126...64032016008004002001] with a period of 999 digits, ...
Did you notice that the start of the period is the powers of 5? 1, 5, 25, 125, 625, ...
What about powers of 3 backwards? ..., 81, 27, 9, 3, 1
1/29 = 0.[0344827586206896551724137931] with a period length of 28,
1/299 = 0.[00334448160535117056...48829431438127090301] with a period length of 66,
1/2999 = 0.[00033344448149383127...29243081027009003001] with a period of 1499 digits,
and the powers of 4 backwards: ..., 256, 64, 16, 4, 1
1/39 = 0.[025641] with period length of 6
1/399 = 0.[002506265664160401] with a period length of 18
1/3999 = 0.[00025006251562890722...97024256064016004001] with a period length of 105
and they seem to begin with the powers of 25: 1, 25, 625, 15625, 390625,... but with 5 digits per number!

An interesting thing happens with the Triangular Numbers

1, 3, 6, 10, 15, 21, 28, ...
which we will meet later on this page. Here they are in a fraction with 2 digits per triangular number:
100/970299 = 0.[000103061015212836...5545362821151006030100], period length is 19602
The series appears both forwards from the left and backwards from the right!

The Fibonacci numbers backwards appear as the periods of:

10/109 = 0.[0917431192660550458...064220183486238532110] (108 digits)
100/10099 = 0.[00990197049212793345...34211308050302010100] (3366 digits)
1000/1000999 = 0.[0009990019970049920...008005003002001001000] (500499 digits)

Why? I will expand this section soon to include some of the theory so that we can directly find a fraction for a given series....watch this space!

See if you can spot some more rules for other series in this Calculator:

#### Series to Decimal Fraction Calculator

If numbers become too large to decide if the fraction terminates or recurs or to compute the size of fixed and periodic parts, an error message is shown but you can still use the Show button to display any number of decimal places, even thousands of decimal places if you want!
C A L C U L A T O R
Series to Decimal Fraction

 decimal places
Show periods as 123:  or [123]:
k for k from 0 to
with each power shifted digits
and multiply by
R E S U L T S

### Summing powers in a decimal

#### Things to do

1. What series do you notice in the decimal expansion of 1/9801?
2. What fraction would give the same series but starting at 1 instead of 0? 100/9801
3. Can you guess a fraction that has three places for each member of this series? 1/998001
4. ... and what about a fraction with four places for each number? 1/99980001
1. Look at your answer to the previous question and take a guess as to what 2/9801 would look like.
Check your answer with the calculator above. 0, 2, 4, 6, 8, ... the evens, two digits at a time
2. What series appears in the decimal for 3/9801? 0, 3, 6, 9, 12, ... the triples two digits at a time

### Why do the powers patterns ultimately disappear?

We said earlier that all fractions when put into decimal form either terminate or recurr. This is true for our fractions whose decimal fractions correspond to a particular number series. They cannot go on for ever in the decimal digits! The reason lies in the fact that the numbers (the powers of 2, say) appear with two digits each. When we get to a power greater than 100, there will be an "overflow" into the 2-digit power before it. In fact what happens is that we do include every number from 0 upwards but the overflows eventually cause the decimal to get into a recurring sequence.

### Number of Divisors

The fractions 1/10k – 1 have a fascinating application.
They are all periodic as none of their denominators has a factor of 2 or 5:
k1/10k-1decimal
11/90.[1]0.111111111...
21/990.[01]0.010101010...
31/9990.[001]0.001001001...
41/99990.[00001]0.000100010...
51/999990.[000001]0.000010000...
60.000001000...
70.000000100...
80.000000010...
90.000000001...
...
Sum0.122324243...
The sum might not seem interesting until we realise that
• the first row has a 1 in every position
• the second row has a 1 in every other position - the even positions
• the third row has a 1 in every third position, where the column number is a multiple of 3
• ...
So in column C there is a 1 on row k whenever k is a divisor of C.
The sum of the rows is therefore the series of the number of divisors of C but as a decimal!
 C Divisors #Divisors 1 2 3 4 5 6 7 8 9 ... 1 1,2 1,3 1,2,4 1,5 1,2,3,6 1,7 1,2,4,8 1,3,9 ... 1 2 2 3 2 4 2 4 3 ...
Surprisingly this is correct for 46 decimal places:
0.1223242434262445262644283446282644492448282664
and then we find the number of divisors of 48 is 10 and its tens digit overflows into the 47th decimal place sadly!
We can increase the accuracy of the decimal by taking 2 digits per value, so we have the following as the first 100 dps:
0.0102020302040204030402060204040502060206040402080304040602080206040404090204040802080206060402100306...
We can see the last three values are now 10, 3 and 6 as the number of divisors of 48, 49 and 50.
This decimal is now correct up to 90717 decimal places because the first number with more than 99 divisors is 45360 which has 100 divisors.

The number of divisors of n is sometimes written as τ(n). For more values and more details see A000005.
The digits of the decimal sum are given in A073668.
For now, let's return to those series of number which do correspond to a proper fraction and we will discover some methods and techniques for finding a fraction which has the series as its decimal expansion.

## How to turn a Series into a decimal fraction

There are lots of other series such as powers of 2: 0, 1, 2, 4, 8, 16, ... or the Fibonacci numbers 0,1,1,2,3,5,8,13,21,... which appear as the decimal form of some special fractions, but not all series! There is no fraction that gives the primes numbers for example. So which series can we find in our decimal fractions and which can we not find?
A list of some of those we can find is given in the selection menu in the above Decimal Series to Fraction Calculator. Pick one and the decimal fraction with this as an initial segment in its periodic decimal expansion will be filled in for you in the calculator's boxes so you can use the other buttons to explore it.

In this section we look at various methods of finding a fraction and what kinds of series they can generate as a decimal fraction.

From the Summing a Power Series section above we found that
S = 1 + x + x2 + x2 + x2 +... =
 1 1 – x
This is the basic formula for our powers-in-a-decimal form if we let x = p/10d for powers of p with d digits per power.

If we look at powers of 1 and d=2, we get

1 +
 1 102
+
 1 104
+ ... = 1.01 01 01 01 ... =
 1 1-1/100
=
 100 99
To make it a fraction less than 1, we divide by 100, or, equivalently, subtract 1, to get:
 100 99
÷ 100 =
 100 99
– 1 =
 1 99
= 0.01 01 01 01 01
Choosing different values for d, the number of places per item in the series, we have:
 1 9
= 0. 1 1 1 1 ...
 1 99
= 0.01 01 01 01 01 ...
 1 999
= 0.001 001 001 001 ...
Now we can get any constant series k, k, k, k, ... with any number of digits per item by multiplying the above fractions by k
 k 9
= 0. k k k k ...
 k 99
= 0.0k 0k 0k 0k 0k ...
 k 999
= 0.00k 00k 00k 00k ...
 k 10d – 1
= 0. [k] if 0≤k≤10d-1

If our series is a sum of two series, we can add their fractions.
For example the series 2n + 3n is 0, 1+1, 2+3, 4+9, 8+27, ... = 2, 5, 13, 35, 97, ... (A007698).
With 3 digits per term, 2n and 3n appear in the fractions
 1 103-2
=
 1 998
= 0. 001 002 004 008 016 ...
 1 103-3
=
 1 997
= 0. 003 009 027 081 ...
so the sum is the fraction
 1 998
+
 1 997
=
 1995 995006
= 0. 002 005 013 035 097 ...

### Moving a series several places

To move a series, we merely multiply the fraction by a power of 10 to move it to the left in the decimal, or divide it by a power of 10 to move it to the right, introducing zeroes as the new decimal places after the decimal point. We can also just add an integer before we divide too.
The series 0, 2, 5, 13, 35, 97, ... which is the series 2n+3n but starting with 0 is
 1995 995006
= 0. 002 005 013 035 097 ...
 1995 995006×1000
= 0. 000 002 005 013 035 097 ...
and the series 5, 13, 35, 97, ... which omits the first term is
 1995 995006
= 0. 002 005 013 035 097 ...
 1995×1000 995006
= 2. 005 013 035 097 ...
0.005 013 035 097 ... =
 1995×1000 995006
– 2 =
 2494 497503

### Multiplying by a constant

To make our series more general, we can multiply a power series by a constant.
For example, 1/7 = 0.142857 and this looks suspiciously like the beginning of the series
14, 28, 56, 112, ... = 14×1, 14×2, 14×22, 14×23,...
which is the powers of two with 2 digits each, multiplied by 14.
The powers of 2, with 2 digits each is 1/98 = 0.0102040816326530612244897959183673469387755 and so multiplying by 14 gives
14/98 = 1/7 =0.142857
Our suspicion is proved correct!

### The Accumulating sums of a series

Finding the successive sums of a series, or accumulating the sum as we progress down a series, is a useful technique:
P(x) = a + b x + c x2 + d x3 + ...
Accumulating the sums:
a + (a + b) x + (a + b + c) x2 + (a + b + c + d ) x3 + ...
If a series is the successive sums of another series, we call it an accumulating series. For instance, accumulating the sums of the constant series 1, 1, 1, 1, 1, ... gives the series 0, 1, 2, 3, 4, 5, ... and note that we begin with 0 as the first "sum". If our series is d digits per series item then we can multiply the fraction by
 10d 10d–1
to accumulate the sums beginning with the first term or multiply by
 1 10d–1
to accumulate the sums from 0:
0. 01 01 01 01 01 01 ... =
 1 99
and accumulating its sums we have
0. 01 02 03 04 05 06 07 ... =
 100 99×99

0. 00 01 02 03 04 05 06 ... =
 1 99×99
=
 1 9801
To remove the initial zero, multiply by 100:
0. 01 02 03 04 05 06 ... =
 100 99×99
=
 100 9801
Again, accumulating these sums we have
0. 00 01 03 06 10 15 21 =
 100 9801×99
=
 100 970299
which are called the Triangular Numbers
Starting at 1 rather than 0, we move the series to the left:
0. 01 03 06 10 15 21 =
 10000 970299
If we accumulate the sums of the constant series 2, 2, 2, 2, 2, ... we get the even numbers:
0. 02 02 02 02 02 ... =
 2 99

0. 00 02 04 06 08 10 ... =
 2 99×99
=
 2 9801
Earlier we saw that 1/9801 is the fraction for the natural numbers 2 digits at a time and this fraction shows us that doubling it will also give the even numbers.

To get the odd numbers, we can add 1 to each of the even numbers because the series 2n+1 is double (the natural number series) + (the constant 1 series):

0. 01 03 05 07 09 ...
= 2 × ( 0. 00 01 02 03 04 05 ... ) + 0. 01 01 01 01 01 ...
=
 2 99×99
+
 1 99

=
 101 9801
The numerator 101 tell us that we can also take the series for 1/9801, which is the natural number series 0, 1, 2, 3, ..., and shift it two places to the left (multiply by 100) then add it to the natural numbers series again:
0. 01 03 05 07 09 = 100 (0. 00 01 02 03 04 05 ...) + (0.00 01 02 03 04 05 ...)
=
 101 9801

=
 10 a + b 89
for 1 digit per term
=
 100 a + b 9899
for 2 digits per term
=
 1000 a + b 998999
for 3 digits per term

#### Why this works (optional)

The accumulated sums of power series in x is found by dividing by 1 - x:
 a + b x + c x2 + d x3 + ... 1 - x
= a + (a+b) x + (a+b+c) x2 + (a+b+c+d) x3 + ...
Another way of showing this is that earlier, in Summing a power series we showed that
 1 1 - x
= 1 + x + x2 + x3 + x4 +...
Using this and multiplying out the brackets to collect terms in x we have:
 a + b x + c x2 + d x3 + ... 1 - x
= (1 + x + x2 + x3 + x4 +... ) (a + b x + c x2 + d x3 + ...)
= a + (a+b) x + (a+b+c) x2 + (a+b+c+d) x3 + ...
Note that in decimal, base 10, we use x = 1/10d since we want d decimal places at a time for each number.
This accumulating powers of x by multiplying by 1 / (1–x) means multiplying by
 1 1 - x
=
 1 1 - 1/10d
=
 10d 10d – 1
Multiplying by the simpler fraction 1/(10d–1) means we have also divided by 10d which will have moved our series 1 number to the right or d decimal places, which is where the initial d 0's come from.

### Differences

Let's take a look at the series of square numbers 1, 22=4, 32=9, 42=16, 25, 36, ... . What proper fraction produces this series in its decimal fraction?
Here we can find successive differences:
 Squares: Differences 0 1 4 9 16 25 36 ... 1 3 5 7 9 11
Now we can see that the squares are the accumulated sums of the odd numbers!
This is easily verified since we add an odd number to one square to get the next:
(n + 1)2 = n2 + 2n + 1
Let's then take the fraction for the odd numbers of two digits each: 101/9801 and apply the "accumulate the sums" operation of dividing by 99:
0. 01 03 05 07 09 ... =
 101 9801

0. 00 01 04 09 16 25 ... =
 101 9801×99
=
 101 970299
So the squares, 3 digits at a time would be
0. 000 001 004 009 016 025 ... =
 1001 998001×999
Also, we see that the the square numbers are the sum of two consecutive Triangular numbers since the numerator here is 1001 and the denominator is the one for the Triangular numbers that we found above:
 0. 000 001 003 006 010 015 ... 1001/(998001×1000) + 0. 001 003 006 010 015 ... + 1001/998001 = 0. 001 004 009 016 025 ... = 1002001/998001000

If we take the cubes, we can find differences and then take their differences, the second differences, and when we take differences of the second differences (the third differences), we find a constant series:

 Cubes: 1st Differences: 2nd Differences: 3rd Differences: 0 1 8 27 64 125 216 ... 1 7 19 37 61 91 ... 6 12 18 24 30 ... 6 6 6 6 ...
This shows us how to find a decimal fraction for the series of cubes:
First, the constant series of 6's with 3 digits each:
0. 006 006 006 006 ... =
 6 999
=
 2 333
Accumulating the sums:
0. 000 006 012 018 ... =
 2 333×999
=
 2 332 667
But we need to start at 1, so we add on 0.001 = 1/1000:
0. 001 006 012 018 ... =
 2 332 667
+
 1 1000
=
 334 667 332 667 000
and these we accumulate without introducing an initial zero term:
 334 667 332 667 000
×
 1000 999
=
 334 667 332 334 333
= 0. 001 007 019 037 ...
and finally one more accumulation, with initial zeroes, to give the cubes:
 334 667 332 334 333 × 999
=
 334 667 332 001 998 667
= 0. 000 001 008 027 064 125 ...

#### Why this works (optional)

What is behind this method for differences is that if P(x) = a + b x + c x2 + d x3 + ... is some power series, for the series a, b, c, d, ... then if we multiply it by 1 – x we get the series of differences:
( 1 – x ) P(x)
= (1 – x) ( a + b x + c x2 + d x3 + ... )
= a + b x + c x2 + d x3 + ... – x (a + b x + c x2 + d x3 + ...)
= a + (b – a) x + (c – b) x2 + (d – c) x3 + ...
Taking differences and accumulating sums are opposite actions on a series (power series).
If we take the differences of the accumulated sums series, we find we arrive back at our original series:
Sums(x) = a + (a + b) x + (a + b + c) x2 + (a + b + c + d ) x3 + ...
the differences here are: a + (a + b – a) x + (a + b + c – (a + b)) x2 + (a+b+c+d–(a+b+c)) x3 + ...
= a + b x + c x2 + d x3 + ... = P(x)

## Fibonacci Numbers

As an example of what we can do with series-in-a-fraction we will look at the decimal fractions for the Fibonacci Numbers: 0, 1, 1, 2, 3, 5, 8, 13, .... The next is just the sum of the previous two numbers in the series.
On my Fibonacci pages, in the section The Fibonacci Series as a Decimal Fraction we saw how to prove that 1/89 was the Fibonacci series-in-a-fraction by using a generating function, which is a polynomial which encoded the Fibonacci numbers as its coefficients:
P(x)=F(0) x + F(1) x2 + F(2) x3 + ... ...+F(n-1)x n + ...
which we showed was
P(x)   =
 x2 1 – x – x2
=
 1 x–2 – x–1 – 1
If we let x = 1/10 then we have 0 + 1/10 + 1/100 + 2/1000 + 3/104 + ... = 1/100-10-1 = 1/89
For two digits per Fibonacci number, we let x = 1/100 so that we have 0 + 1/102 + 1/104 + 2/106 + 3/108 + ... = 1/10000-100-1 = 1/9899

### Fibonacci Numbers and Pascal's Triangle illustrated by decimal fractions

Another way of looking at this fraction, 1/89 is that it is 1/100-11 and so, from our results above on Summing Powers in a Decimal it is related to powers of 11, that is 1 + 11/10 + 112/100 + 113/1000 + ...:
 1/89 = .01 110 = 1 + .0011 111 = 11 + .000121 112 = 121 + .00001331 113 = 1331 + .0000014641 114 = 14641 + ...
which, in turn, is related to Pascal's Triangle. Since we are looking at the decimal fraction for powers of 11, then each power will be shifted by 1 place and so we get out diagonal line in Pascal's Triangle.

Finally, why are powers of 11 related to Pascal's Triangle? Because if E is a power of 11 then the next power is 11 E or (10+1) E so we have the previous power's neighbouring digits added to get the digits of the next power of 11, just as we found elements in Pascal's triangle by adding the two in the previous row to get the one in the next row under them.

Reference:

### Lucas Numbers

The Lucas Numbers, L(n), are another Fibonacci-type series but begin with 2, 1, ... and use the Fibonacci Rule of add the lastest two numbers to get the next:
2, 1, 3, 4, 7, 11, 18, 29, ... A000032
They are also just the sum of the two Fibonacci numbers on either side of a Fibonacci number:
L(n) = F(n+1) + F(n-1)
Here are the steps for building a fraction for the Lucas Numbers with two digits per item:
1. The fraction for F(n) taken 2 digits at a time and starting at 0 is 1/9899 = 0. 00 01 01 02 03 05 08 13 21 ...
2. F(n+1) is seen in the decimal fraction of 1/9899 × 100 = 100/9899 = 0. 01 01 02 03 05 08 13 21 ...
3. F(n-1) is seen in the decimal fraction for 1/9899 ÷ 100 = 1/989900 = 0. 00 00 01 01 02 03 05 08 13 21 ... although we need to introduce 1 before the 0 term to make the Fibonacci rule apply:
1, 0, 1, 1, 2, 3, 5, ...
so our fraction for the F(n+1) series is (1 + 1/9899) ÷ 100 = 9900/989900 = 99/9899 = 0. 01 00 01 01 02 03 05 08 13 ...
4. the Lucas numbers L(n)=F(n+1)+F(n-1) are seen in the decimal fraction of 99/9899 + 100/9899 = 199/9899 = 0. 02 01 03 04 07 11 18 29 ...

### General Fibonacci-type series

There are many other pairs of starting numbers that, with the Fibonacci Rule, give interesting series, called General Fibonacci series, G(a,b,n), where a and b are the two starting values. So
• the Fibonacci numbers are F(n) = 0,1, 1,2,3,5,8,... = G(0,1,n)
• the Lucas numbers are L(n) = 2,1, 3,4,7,11,18,... = G(2,1,n)
• G(a,b,n) = a F(n-1) + b F(n) which we found on The General Fibonacci Numbers page.
Adding the proper fractions by a and b, the first shifted left, gives:
G(a,b,n) = a, b, a+b, 2a+b, 3a+2b, ... , a F(n-1) + b F(n), ...
=
 a 10d + b 102 d – 10d – 1
the last fraction being for d digits per term. So for d=1, 2, 3 we have
d:123
Fraction:
 a 10d + b 89
 a 100 + b 9899
 a 1000 + b 998999

### Things to do

1. The Pentagonal Numbers are 0, 1, 5, 12, 22, 35, 51, 70, ... A000326 and have constant second differences. Find a fraction which has this series in its decimal expansion with 3 digits per number.
 Pentagonals: 1st Differences: 2nd Differences: 0 1 5 12 22 35 51 ... 1 4 7 10 14 17 ... 3 3 3 3 3 ...
0. 000 001 005 012 022 035 051 ... = ((3/999+1/1000)/999 + 1/1000)/999 =
 334 332 334 333
2. Look at the fractions (2 digits per number) for the triangular numbers, the square numbers and, from the previous question, the pentagonal numbers. What do you think is the next fraction in the sequence (the hexagonal numbers)?
3. For the Lucas Numbers, 2,1,3,4,... what proper fraction expands to 2.01 03 04 07 11 ... ?

## Other bases

If we consider bases other than 10, all our results still hold with some slight modifications. All fractions are terminating or purely recurring or mixed recurring.
Here is a table of the fractions 1/n for n from 2 to 12 in bases from 2 to 12. For bases above 10 we use the letters A=10, B=11, ... , Z=35, either UPPERCASE or lower.

1/n terminating in bases 2 to 12
Base:1/21/31/41/51/61/71/81/91/101/111/12
20.10.[01]0.010.[0011]0.0[01]0.[001]0.0010.[000111]0.0[0011]0.[0001011101]0.00[01]
30.[1]0.10.[02]0.[0121]0.0[1]0.[010212]0.[01]0.010.[0022]0.[00211]0.0[02]
40.20.[1]0.10.[03]0.0[2]0.[021]0.020.[013]0.0[12]0.[01131]0.0[1]
50.[2]0.[13]0.[1]0.10.[04]0.[032412]0.[03]0.[023421]0.0[2]0.[02114]0.[02]
60.30.20.130.[1]0.10.[05]0.0430.040.0[3]0.[0313452421]0.03
70.[3]0.[2]0.[15]0.[1254]0.[1]0.10.[06]0.[053]0.[0462]0.[0431162355]0.[04]
80.40.[25]0.20.[1463]0.1[25]0.[1]0.10.[07]0.0[6314]0.[0564272135]0.0[52]
90.[4]0.30.[2]0.[17]0.1[4]0.[125]0.[1]0.10.[08]0.[07324]0.0[6]
100.50.[3]0.250.20.1[6]0.[142857]0.1250.[1]0.10.[09]0.08[3]
110.[5]0.[37]0.[28]0.[2]0.[19]0.[163]0.[14]0.[124986]0.[1]0.10.[0A]
120.60.40.30.[2497]0.20.[186A35]0.160.140.1[2497]0.[1]0.1
130.[6]0.[4]0.[3]0.[27A5]0.[2]0.[1B]0.[18]0.[15A]0.[13B9]0.[12495BA837]0.[1]
140.70.[49]0.370.[2B]0.2[49]0.20.1A70.[17AC63]0.1[58]0.[13B65]0.12[49]
150.[7]0.50.[3B]0.30.2[7]0.[2]0.[1D]0.1A0.1[7]0.[156C4]0.1[3B]
160.80.[5]0.40.[3]0.2[A]0.[249]0.20.[1C7]0.1[9]0.[1745D]0.1[5]
180.90.60.490.[3AE7]0.30.[2A5]0.2490.20.1[E73A]0.[1B834G69ED]0.19
190.[9]0.[6]0.[4E]0.[3F]0.[3]0.[2DAG58]0.[27]0.[2]0.[1H]0.[1DFA6H538C]0.[1B]
200.A0.[6D]0.50.40.3[6D]0.[2H]0.2A0.[248HFB]0.20.[1G759]0.1[D6]
210.[A]0.70.[5]0.[4]0.3[A]0.30.[2D]0.270.[2]0.[1J]0.1[F]

Here is a table of the sizes of the fixed part and of the period of the decimals of 1/n for n from 2 to 21 and the type of the decimal fraction in each base from 2 to 21:
Fixed and Recurring lengths of 1/n in bases 2 to 21
Base:1/n1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/101/111/121/131/141/151/161/171/181/191/201/211/221/231/241/251/261/271/281/291/30
21002200412033006140102201213044008160182406110011320201120182302814
3011002041106022004051203061404016210180416050111202003300602814
41001100211032003120511061302200413091203150112101016091301412
501020110020602061105020406120401606091106050220220040180601412
610102001100230201101020012121140016200921121100113005112302201411
70101020401100203040100201211040201603030411010022020401209120704
8100210041201100214010120411042008120614021100111202014061102814
90110010211030110020511030312020811090213050111101003200301412
1010012010110630011002210616114001611018200612022312016032602811
110102020102030206011002012030204016060302061102202050120180602802
121010100410062020140110021614200162006141611011200201230160414
130101010401020203040100110020404040301804020100110202011090201404
141002200212103006120522011002400161601822121502232010110182002812
15011002101101022011051201201100208210181211050221220012300202811
1610011001110310031105110313011002130911031501111051309130711
1701020104020601020401002060604011002090406010022020200606060404
1810102004100330101401020041314400110022413110011300414202302814
1901010202010602010201002012060204080110020601002202010012030602802
20100210101202200610051201212122001616011002150222220112018120712
210110010111100220010211041111040421018011002022120504301102811

We usually call the base-B digits in the expansion of a base-B fraction the decimal form of the fraction even if the base is not 10. We ought really to talk about the bimals for base 2 and the trimals for base 3, etc, but this sounds strange, so we opt for the easier base 2 decimal or base 3 decimal, etc.

### Terminating Fractions in other bases

For prime bases such as 2,3,5,7 and 11, the only fractions which terminate must have a denominator which is a power of that prime.
The same is also true for bases which are themselves a power of a prime such as base 4 = 22, base 8 = 23 and base 9 = 32. Their terminating fractions are those with a denominator which is a power of that same prime.
So what about bases whose factors involve more than one prime?
basen where m/n
terminates
OEISDescription
22,4,8,16,32,...A000079{2i|i≥0}
33,9,27,81,...A000244{3i|i≥0}
42,4,8,16,32,...A000079{2i|i≥0}
55,25,125,...A000351{5i|i≥0}
62,3,4,6,8,9,12,16,18,24,...A003586{2i3j|i,j≥0}
77,49,...A000420{7i|i≥0}
82,4,8,16,32,...A000079{2i|i≥0}
93,6,9,27,54,81,...A000244{3i|i≥0}
102,4,5,8,10,16,20,...A003592{2i5j|i,j≥0}
1111,121,...A001020{11i|i≥0}
122,3,4,6,8,9,12,16,18,24,...A003586{2i3j|i,j≥0}
{ expression | condition } is the set of all numbers described by the expression but subject to, or generated by, the given condition. For example:
{2i3j|i,j≥0} is the set of numbers which are a product of a power of 2 and a power of 3 where the power i of 2 and the power j of 3 are the (whole) numbers 0 or more.

The general rule is

The Terminating Fraction Rule
A fraction N/D terminates in base B if all the prime factors of the denominator D are also prime factors of the base B.
The numerator does not affect the termination of the "decimal".
Why does a fraction N/D terminate?
Let's look at an example first:
1/500 in base 10 is a terminating decimal fraction because
1/500 = 0.002 = 2/1000, so the denominator, 500 divides exactly into 1000=103 and we have 3 decimal digits in the decimal fraction.
We have found a power of 10 which is an exact multiple of the denominator, 50.
In any base B, let's look at 1/D.
This terminates if when we can find some power of the base B which is an exact multiple of D.
Only if all of D's prime factors are also prime factors of B will we be able to find such a multiple.
In base 10, 1/3 will not terminate as a decimal because 3, a prime, is not a prime factor of 10. Similarly for 1/6 for though 6 has 2 as a prime factor which is also a prime factor of 10, the prime factor 3 is not. Any number of the form 2i×5j will always be a factor of 10i×j at the most.
The smallest power of the base B which is an exact multiple of the denominator is the number of base-B digits in the base B decimal fraction for N/D (in its lowest form).

This describes all the terminating fractions in base B and therefore:
A fraction N/D recurs in base B if D has a prime factor that is not a prime factor of the base B

#### Decimal Fractions Calculator for any Base

C A L C U L A T O R for Decimal Fractions in any Base
 only terminating only recurring terminating & recurring lengths of the digits of fractions with denominators in bases from to from to Show periods as 123 : or [123]:
R E S U L T S

#### Things to do

1. What is 1/2 in bases 2 to 12?
Write your result mathematically. 1/22b+1 = 0.[b]
1/22b = 0.b
2. Which denominators that are terminating in base 10 (decimal) are also terminating in base 2 (binary)? All of them because they are just the powers of 2
3. If all the recurring fraction's denominators in base B are also all the recurring fraction's denominators in base C, what can you say about B and C? Since recurring fraction's denominators have no prime factor in common with the base, then both B and C must have the same prime factors.

## Are there any other types of numbers that are not fractional?

Are there numbers whose decimal fractions neither terminate nor recurr?
Numbers whose decimal fraction terminate or end up recurring are always proper fractions as we have seen on this page. No other numbers have these properties.
So what about the decimal number 0.01 001 0001 00001 ... which does not end but also never repeats as each set of 0's-and-1's that we write has an extra 0 in it compared with the previous set.
But clearly no pattern of a fixed length repeats here and so this decimal does not represent any proper fraction.
Many important numbers that we use often in mathematics are non-fractional or non-ratio-nal numbers; they are called irrational numbers.

Probably the earliest number found to be irrational was √2 = 1.414213562373095... probably by Theodorus, the tutor of Plato, around 400BC.

Some other examples are
• 1/2 = 0.707106781... = cos(45°)
• 1+2 = 2.414213562373095... = tan(67.5°)
• 3 = 1.732050807568877... = tan(60°)
• 3/2 = 0.866025403784 = sin(60°)
• π = 3.141592653589793... proved irrational by Lambert in 1761
• Φ = Phi = 1.6180339887..., φ = phi = 0..6180339887... the golden ratios
• e = 2.718281828490..., the base of natural logarithms, proved irrational by Euler in 1737 who also introduced the use of e for this number.
If r is irrational then so are the following for any positive or negative rationals k, ℓ
• k + ℓ r and k – ℓ r
• k / r and k × r
The reason is that if k + ℓ r = X say, is rational, then we can solve for r and find r = (X - k)/ℓ which would also be rational.
So, conversely, if r is irrational then so is k + ℓ r . Similarly for
k – ℓ r
k / r
k × r
.

According to Hardy and Wright (see above), Theorem 45:

If x is a root of an equation
xm + c1 xm–1 + c2 xm–2 + ... + cm= 0
where the ci are integers of which the first is 1,
then x is either an integer or is irrational.
Since √2 is a root of x2 – 1 = 0 and is clearly not an integer, then this Theorem shows it must be irrational.
Also, kn is a root of xk – n = 0 so, if n is not obviously an integer (is not the k-th power of an integer), then it too is irrational.

### Things to do

1. Find some more English words that begin with ir- where the ir- means not and negates the meaning of the rest of the word:
e.g. an irregular polygon is a polygon that is not regular (a regular polygon has all sides and all angles equal).
This may be irrelevant or you may find it an irresistible challenge. ]
2. Find some other words which begin with ir- which do not have this meaning.
I know an Irish man who likes to iron out such irritating questions.
The square root of 2 as a decimal fraction is 1.41421 35623 73095 .... .
No matter how far we go on expanding this number as an ever more precise decimal fraction, its decimal digits will never get into any repeating pattern.
Suppose we can write √2 as the fraction p/q, where p and q have no common factors, so that p/q is in its lowest terms.
√2 = p/q ............... (1)
Squaring we have: 2 = p2/q2
Multiplying by q2: 2 q2 = p2 ........... (2)
So we see that p2 is even and therefore p is even and we can write it as p = 2 k.
Putting this in (2) we have 2 q2 = (2k)2 = 4 k2
Dividing by 2: q2 = 2 k2
But now we have shown q too must be even.
This cannot be since we said p/q was in its lowest terms so there is no factor in common between them.
Since assuming √2 is a fraction which can be written in its lowest terms leads to a logical contradiction, then √2 cannot be written as a fraction.

OR, putting this argument in another way....

Let's assume √2 = p/q where we make no assumption about lowest terms.
The reasoning aboves shows that both p and q are both even, so we can write p=2k and q=2n This means that √2 = p/q = (2k)/(2n) = k/n
But now the same reasoning shows that k and n are also both even.
We can continue this for ever, in an infinite decent with the numbers getting smaller and smaller with no end.
This is impossible for positive integers whose lowest value is 1.
We have to again conclude that √2 cannot be written as p/q with two integers p and q.

There are lots of other irrational numbers too -- such as:
• the square root of any non-square number. The list of these begins 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, ... A000037
• the cube roots of any non-cube number. The list begins 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, ... A004709 where we have omitted 23=8, 33=27, 43=64, ... A000578
• the fourth roots of any non-fourth-power number.
• and so on for all the nth-roots of non-nth-powers... 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, ... A007916
where we omit 22=4, 23=8, 32=9, 24=42=16, 52=25, 33=27, 25=32, 62=36, ... A001597
• sines, cosines and tangents of most angles
• logs to any base of most numbers

### Algebraic Numbers

Any number that is a root of a polynomial with integer or fractional coefficients is called an algebraic number
In finding methods of solving equations, we get a heirarchy from each type of polynomial with a different degree.
The degree of a polynomial in x is the highest power of x in the polynomial.
For instance, a degree 1 polynomial in its most general form is a x = b for rational numbers (or integers) a and b.
It can be solved to give x = b/a which is a rational number or integer.

For degree 2, we have quadratic equations of the general form a x2 + b x + c = 0.
Here solutions involve square-roots in general and sometimes square-roots of negative numbers, which leads us to complex numbers x + i y where i = -1.
If y is zero, the number is real and if not, it is complex.
Solving higher degree polynomial equations involvers no other types of number than complex numbers!

There are other numbers that are not the roots of any finite polynomial with rational coefficients: they are called transcendental numbers. Such numbers are π, e and many other trigonometric and logarithmic values.

It is generally quite hard to prove a number is transcendental since we have to show it is not the root of any polynomial with rational coefficients.

Fraction ↔ Decimal in any base Calculator

A Fractions to Decimal and Decimal to Fraction Calculators for any base not just base 10 (decimal) is on a separate page: Fractions - Decimal Calculator .

## References

In date order, earliest first:
• Of the Theory of Circulating Decimal Fractions Robertson, Philosophical Trans. (1768), pg 207
was perhaps the first to use the dot notation to indicate the periodic part of a decimal fraction.
See the next reference, footnote on page 379
• Disquisitiones Arithmeticae Carl Fredrich GAUSS, translated into English by Arthur A Clark, (Yale 1965)
The classic and famous book that astonished the mathematical world when it first came out (in Latin) dating from initial sections 1810 to the full book in 1863. It introduces the modulus, remainders and congruence arithmetic and all its many applications which were quite new when they first appeared.
Sections 309-18 deal with decimal fractions and periods.
• The Enjoyment of Mathematics - Selections from Mathematics for the Amateur H Rademacher, O Toeplitz (Dover 1990).
This is the Dover edition of an English translation of the original German work of 1933. It is a great book of chapters on lots of mathematical topics suitable to the non-specialist-but-fairly-serious "amateur". Chapter 23 on Periodic Decimal Fractions is the fullest treatment of the subject that I have found and is recommended although all of it is incorporated into this page.
• The Decimal Expansion of 1/89 and Related Results C T Long Fibonacci Quarterly 19 (1981) 53-55 (pdf )
• A Complete Characterization of the Decimal Fractions That Can be Represented as Σ 10-k(i+1) Fai where Fai Is the ai-th Fibonacci Number R H Hudson, C F Winans Fibonacci Quarterly 19 (1981) 414-422 (pdf )
• The General Solution to the Decimal Fraction of Fibonacci Series Pin-Yen Lin Fibonacci Quarterly 22 (1984) 229-234 (pdf )
• Generating Functions of Fibonacci-Like Sequences and Decimal Expansions of Some Fractions G Köhler Fibonacci Quarterly 23 (1985) 29-35 (pdf )
• Retrograde Renegades and the Pascal Connection: Repeating Decimals Represented by Fibonacci and Other Sequences Appearing from Right to Left M Bicknell-Johnson, Fibonacci Quarterly 27 (1989) 448-457 (pdf )
• Retrograde Renegades and the Pascal Connection II: Repeating Decimals Represented by Sequences of Diagonal Sums of Generalized Pascal Triangles Appearing from Right to Left M Bicknell-Johnson, Fibonacci Quarterly 31 (1993) 346-353 (pdf )
• Designer Decimals: Fractions which contain second order recursion sequences in their decimal expansions, reading left to right or right to left M Bicknell-Johnson, in Applications of Fibonacci Numbers Vol 5 eds G Bergum, A Philippou, A Horadam, Kluwer (1993) pgs 69-75.
• A Note on Some Irrational Decimal Fractions, A. McD. Mercer, American Mathematical Monthly Vol. 101 (1994), pages 567-8.
• Introduction to the Theory of numbers by G H Hardy and E M Wright Oxford University Press, (6th edition, 2008), paperback. Another classic book on Number Theory that covers decimal fractions and periods in detail.

• 2014 June 18: New Things to Do for fractions in other bases
• 2014 June 12: Typos corrected, minor clarifications to text.
• 2014 May 30: Added: Backwards series, lengths of fixed and recurring parts and explanations, number of divisors decimal; extended calculators to include these
• 2014 May 9: section added: How to turn a Series into a Decimal Fraction, automated Contents generation, better format for Maths
• 2014 April 30: more buttons added to show explanations and answers.
• 2014 April 23: added the Other Bases section with the Terminating/Recurring Base calculator