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.
Contents of 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.
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:
Stopping
Endless
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...
Stopping
Endless
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
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.
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:
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
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:
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.
a dot is put over the first and last digits in the recurring sequence
This notation goes back at least to Robertson (1768).
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:
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:
Which of these decimal fractions is not the same as
0· 123 123 123 ...? [Press the button to check your answer.]:
This is 0. 123 123 123 123 ...
This is another way of writing 0. 123 123 123 123 ...
This is 0. 1 231 231 231 231 ... which is the same decimal fraction.
Well done - correct! This is 0. 1 23123 23123 ... and is not
the same as 0. 1231231231231...
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
Use the interactive calculator following these questions to help you answer them:
[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.]
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 7^{th} 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]
Is this true of the eigths? Try all the fractions from 1/8 to
7/8.
No!
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
in base
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 10^{the 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 10^{the 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
10^{3} since the period is of length 3:
10^{3} 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:
10^{3} d
=
37
.037 037 037 ...
–
d
=
0
.037 037 037 ...
10^{3}d – d
=
37
.000 000 000 ...
(10^{3} – 1) d
=
37
d
=
37/999
d
=
1/27
The process is to multiply the purely periodic decimal by
10^{length 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 10^{length 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
Things to do
Can you find a fraction which is all 1's: 0.[1]=0.111111...?
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>
Without using the calculator, what fraction is 0.[3]=0.3333...?
... and what is 0.[4]=0.44444...?
Can you find a fraction which repeats your age (e.g. 0.[14]=0.14 14 14 14 14... )?
What fraction will it be on your next birthday?
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
Can you... find a fraction which is 0.123456789?
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....
What is 3.1 as a fraction?
What is 3.14 as a fraction?
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:
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 2^{a}×5^{b}
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:
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
n
1/n
Period length
n is Prime?
3
0.3
1
Prime
7
0.142857
6
Prime
9
0.1
1
not Prime
11
0.09
2
Prime
13
0.076923
6
Prime
17
0.0588235294117647
16
Prime
19
0.052631578947368421
18
Prime
21
0.047619
6
not Prime
23
0.0434782608695652173913
22
Prime
27
0.037
3
not Prime
29
0.0344827586206896551724137931
28
Prime
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:
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, 10^{6},
when divided by 21, leaves a remainder of
1. That is: 10^{6} = 47619 × 21 + 1 or:
10^{6} - 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 = 2^{3}/_{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.
10^{1} ÷ 7 = 1× 7 + 3 so has remainder 3: 10^{1} ≡ 3 (mod 7)
10^{2} ÷ 7 = 14×7 + 2 so has remainder 2: 10^{2} ≡ 2 (mod 7)
10^{3} ≡ 6 (mod 7)
10^{4} ≡ 4 (mod 7)
10^{5} ≡ 5 (mod 7)
10^{6} ≡ 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
10^{6}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:
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 10and 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} p_{1}^{β1} p_{2}^{β2} ...
where the p_{i} 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 = 2^{2} × 3 so D = 2^{2}, E = 3
The fixed part is determined by D = 2^{2} = 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 × 5^{3} × 7 × 11
so D = 2 × 5^{3}, E = 7 × 11
The fixed part is given by D = 2 × 5^{3} = 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:
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:
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:
n
n/5
Decimal
1
1/5
0.2
2
2/5
0.4
3
3/5
0.6
4
4/5
0.8
n
n/6
Decimal
1
1/6
0.1[6]
2
1/3
0.[3]
3
1/2
0.5
4
2/3
0.[6]
5
5/6
0.8[3]
n
n/8
Decimal
1
1/8
0.125
2
1/4
0.25
3
3/8
0.325
4
1/2
0.5
5
5/8
0.625
6
3/4
0.75
7
7/8
0.875
n
n/12
Decimal
1
1/12
0.08[3]
2
1/6
0.1[6]
3
1/4
0.25
4
1/3
0.[3]
5
5/12
0.41[6]
6
1/2
0.5
n
n/12
Decimal
7
7/12
0.58[3]
8
2/3
0.[6]
9
3/4
0.75
10
5/6
0.8[3]
11
11/12
0.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 10and 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
10^{k} 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
10^{s}n and is again found at 10^{s+t}n.
We can write 10^{s}n ≡ 10^{s+t}n (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: 10^{s} ≡ 10^{s+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.
Using congruences, we can write this as: 13 10^{2} ≡ 13 10^{5} (mod 108)
and, since GCD(108,13)=1, 10^{2} ≡ 10^{5} (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/108
lowest terms
Decimal
1/108
1/108
0.00[925]
2/108
1/54
0.0[185]
3/108
1/36
0.02[7]
4/108
1/27
0.[037]
5/108
5/108
0.04[629]
6/108
1/18
0.0[5]
7/108
7/108
0.06[481]
8/108
2/27
0.[074]
9/108
1/12
0.08[3]
10/108
5/54
0.0[925]
n/108
lowest terms
Decimal
11/108
11/108
0.10[185]
12/108
1/9
0.[1]
13/108
13/108
0.12[037]
14/108
7/54
0.1[296]
15/108
5/36
0.13[8]
16/108
4/27
0.[148]
17/108
17/108
0.15[740]
18/108
1/6
0.1[6]
19/108
19/108
0.17[592]
20/108
5/27
0.[185]
n/108
lowest terms
Decimal
21/108
7/36
0.19[4]
22/108
11/54
0.2[037]
23/108
23/108
0.21[296]
24/108
2/9
0.[2]
25/108
25/108
0.23[148]
26/108
13/54
0.2[407]
27/108
1/4
0.25
28/108
7/27
0.[259]
29/108
29/108
0.26[851]
30/108
5/18
0.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
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
φ(d)
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, .., p^{2}, ... 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.
This looks daunting but it merely means that we split a number into its separate prime factors
p_{i} with their powers α_{i}
and find the φ count
for each of these p_{i}^{α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:
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
φ(d)
0
1
2
25
25
0.04
20
1
2
2
25
50
0.02
20
2
4
0
1
4
0.25
2
2
4
1
5
20
0.05
8
2
4
2
25
100
0.01
40
Total φ=
90
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:
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 10^{n}–1 varies considerably
(A070528 and this table includes the factor 1):
n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#divisors
3
6
8
12
12
64
12
48
20
48
12
256
24
48
128
192
12
640
6
384
For instance, 10^{23}–1 has only 6 factors but 10^{24}–1 has 2048 10^{30}–1 has 16384
Here are three consecutive values of the power with wildly differing numbers of factors: 10^{59}–1
has 12 factors but 10^{60}–1
has 2097152 and 10^{61}–1 has
384.
This is because if m is a factor of
n then 10^{m}–1 is a factor
of 10^{n}–1.
So numbers n
that have many factors will give rise to many factors for 10^{n}–1
All numbers 10^{n}–1 for n>1
have at least these 6 factors:
1, 3, 9, (10^{n}–1)/9 = 11..11, (10^{n}–1)/3 = 33..33, (10^{n}–1)/9 = 999...999
These 6 factors are the only divisors for
10^{2}–1, 10^{19}–1
and 10^{23}–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 tand 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 10^{F}
the denominators of fractions whose decimal is only a period of P decimals are factors of 10^{P}−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:
but there are only 3 possible denominators for these fractions: 2, 5 and 10.
C A L C U L A T O R
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/(10^{2} - 2) = 1/98
the powers of 3 taken two digits at a time are in the fraction 1/(10^{2} - 3) = 1/97
Any guesses as to a fraction whose decimals are the powers of 2 using three digits for each?
Things to do
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.
3^{0}=
0.
0
1
+
3^{1}=
0
3
+
3^{2}=
0
9
+
3^{3}=
2
7
+
3^{4}=
8
1
+
3^{5}=
2
4
3
+
3^{6}=
7
2
9
+
3^{7}=
2
1
8
7
+
3^{...}
...
...
...
...
TOTAL:
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/(10^{d}–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×b^{2}, a×b^{3}, ...
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 b^{i} = a + a×b + a×b^{2} + a×b^{3} + ...
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×b^{2} + a×b^{3} + ... = 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
where the common ratio is p/10^{k} and the first term is 1.
The sum has a limit provided that
p/10^{k} < 1, i.e. p < 10^{k}.
Using the formula above for the sum of a G.P., the sum of all powers is
1 / (1 – p/10^{k}) = 10^{k} / (10^{k} – 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 10^{k}:
0.0001 000p 000p^{2} ... with k digits per power = 1/(10^{k} – 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:
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
in base
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
What series do you notice in the decimal expansion of 1/9801?
What fraction would give the same series but starting at 1 instead of 0?
100/9801
Can you guess a fraction that has three places for each member of this series?
1/998001
... and what about a fraction with four places for each number?
1/99980001
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
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:
k
^{1}/_{10k-1}
decimal
1
1/9
0.[1]
0.111111111...
2
1/99
0.[01]
0.010101010...
3
1/999
0.[001]
0.001001001...
4
1/9999
0.[00001]
0.000100010...
5
1/99999
0.[000001]
0.000010000...
6
0.000001000...
7
0.000000100...
8
0.000000010...
9
0.000000001...
...
Sum
0.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
1
2
3
4
5
6
7
8
9
...
Divisors
1
1,2
1,3
1,2,4
1,5
1,2,3,6
1,7
1,2,4,8
1,3,9
...
#Divisors
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 47^{th} 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:
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.
Unfortunately, none of these decimals correspond to a proper fraction! We return to such non-fractional numbers
later on this page.
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.
This is the basic formula for our powers-in-a-decimal form if we let
x = p/10^{d} for powers of p with d digits per power.
If we look at powers of 1 and d=2, we get
1 +
1
10^{2}
+
1
10^{4}
+ ... = 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 seriesk, 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
10^{d} – 1
= 0. [k] if 0≤k≤10^{d}-1
Add two series
If our series is a sum of two series, we can add their fractions.
For example
the series 2^{n} + 3^{n} is
0, 1+1, 2+3, 4+9, 8+27, ... = 2, 5, 13, 35, 97, ... (A007698).
With 3 digits per term, 2^{n}
and 3^{n} appear in the fractions
1
10^{3}-2
=
1
998
= 0. 001 002 004 008 016 ...
1
10^{3}-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 2^{n}+3^{n} 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
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 x^{2} + d x^{3} + ...
Accumulating the sums:
a + (a + b) x + (a + b + c) x^{2} + (a + b + c + d ) x^{3} + ...
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
10^{d}
10^{d}–1
to accumulate the sums beginning with the first term or
multiply by
1
10^{d}–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):
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:
Using this and multiplying out the brackets to collect terms in x
we have:
a + b x + c x^{2} + d x^{3} + ...
1 - x
= (1 + x + x^{2} + x^{3} + x^{4} +... ) (a + b x + c x^{2} + d x^{3} + ...)
= a + (a+b) x + (a+b+c) x^{2} + (a+b+c+d) x^{3} + ...
Note that in decimal, base 10, we use x = 1/10^{d} 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/10^{d}
=
10^{d}
10^{d} – 1
Multiplying by the simpler fraction 1/(10^{d}–1) means we have also
divided by 10^{d} 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 numbers1, 2^{2}=4, 3^{2}=9, 4^{2}=16, 25, 36, ... .
What proper fraction produces this series in its decimal fraction?
Here we can find successive differences:
Squares:
0
1
4
9
16
25
36
...
Differences
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} = n^{2} + 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:
0
1
8
27
64
125
216
...
1^{st} Differences:
1
7
19
37
61
91
...
2^{nd} Differences:
6
12
18
24
30
...
3^{rd} Differences:
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 x^{2} + d x^{3} + ... 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 x^{2} + d x^{3} + ... )
= a + b x + c x^{2} + d x^{3} + ... – x (a + b x + c x^{2} + d x^{3} + ...)
= a + (b – a) x + (c – b) x^{2} + (d – c) x^{3} + ...
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) x^{2} + (a + b + c + d ) x^{3} + ... the differences here are:
a + (a + b – a) x + (a + b + c – (a + b)) x^{2} + (a+b+c+d–(a+b+c)) x^{3} + ...
= a + b x + c x^{2} + d x^{3} + ...
= 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:
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
11^{0} = 1
+
.0011
11^{1} = 11
+
.000121
11^{2} = 121
+
.00001331
11^{3} = 1331
+
.0000014641
11^{4} = 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.
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:
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:
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 ...
F(n+1) is seen in the decimal fraction of
1/9899 × 100 = 100/9899 = 0. 01 01 02 03 05 08 13 21 ...
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 ...
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)
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 10^{d} + b
10^{2 d} – 10^{d} – 1
the last fraction being for d digits per term. So for
d=1, 2, 3 we have
d:
1
2
3
Fraction:
a 10^{d} + b
89
a 100 + b
9899
a 1000 + b
998999
Things to do
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.
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)?
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/2
1/3
1/4
1/5
1/6
1/7
1/8
1/9
1/10
1/11
1/12
2
0.1
0.[01]
0.01
0.[0011]
0.0[01]
0.[001]
0.001
0.[000111]
0.0[0011]
0.[0001011101]
0.00[01]
3
0.[1]
0.1
0.[02]
0.[0121]
0.0[1]
0.[010212]
0.[01]
0.01
0.[0022]
0.[00211]
0.0[02]
4
0.2
0.[1]
0.1
0.[03]
0.0[2]
0.[021]
0.02
0.[013]
0.0[12]
0.[01131]
0.0[1]
5
0.[2]
0.[13]
0.[1]
0.1
0.[04]
0.[032412]
0.[03]
0.[023421]
0.0[2]
0.[02114]
0.[02]
6
0.3
0.2
0.13
0.[1]
0.1
0.[05]
0.043
0.04
0.0[3]
0.[0313452421]
0.03
7
0.[3]
0.[2]
0.[15]
0.[1254]
0.[1]
0.1
0.[06]
0.[053]
0.[0462]
0.[0431162355]
0.[04]
8
0.4
0.[25]
0.2
0.[1463]
0.1[25]
0.[1]
0.1
0.[07]
0.0[6314]
0.[0564272135]
0.0[52]
9
0.[4]
0.3
0.[2]
0.[17]
0.1[4]
0.[125]
0.[1]
0.1
0.[08]
0.[07324]
0.0[6]
10
0.5
0.[3]
0.25
0.2
0.1[6]
0.[142857]
0.125
0.[1]
0.1
0.[09]
0.08[3]
11
0.[5]
0.[37]
0.[28]
0.[2]
0.[19]
0.[163]
0.[14]
0.[124986]
0.[1]
0.1
0.[0A]
12
0.6
0.4
0.3
0.[2497]
0.2
0.[186A35]
0.16
0.14
0.1[2497]
0.[1]
0.1
13
0.[6]
0.[4]
0.[3]
0.[27A5]
0.[2]
0.[1B]
0.[18]
0.[15A]
0.[13B9]
0.[12495BA837]
0.[1]
14
0.7
0.[49]
0.37
0.[2B]
0.2[49]
0.2
0.1A7
0.[17AC63]
0.1[58]
0.[13B65]
0.12[49]
15
0.[7]
0.5
0.[3B]
0.3
0.2[7]
0.[2]
0.[1D]
0.1A
0.1[7]
0.[156C4]
0.1[3B]
16
0.8
0.[5]
0.4
0.[3]
0.2[A]
0.[249]
0.2
0.[1C7]
0.1[9]
0.[1745D]
0.1[5]
17
0.[8]
0.[5B]
0.[4]
0.[36DA]
0.[2E]
0.[274E9C]
0.[2]
0.[1F]
0.[1BF5]
0.[194ADF7C63]
0.[17]
18
0.9
0.6
0.49
0.[3AE7]
0.3
0.[2A5]
0.249
0.2
0.1[E73A]
0.[1B834G69ED]
0.19
19
0.[9]
0.[6]
0.[4E]
0.[3F]
0.[3]
0.[2DAG58]
0.[27]
0.[2]
0.[1H]
0.[1DFA6H538C]
0.[1B]
20
0.A
0.[6D]
0.5
0.4
0.3[6D]
0.[2H]
0.2A
0.[248HFB]
0.2
0.[1G759]
0.1[D6]
21
0.[A]
0.7
0.[5]
0.[4]
0.3[A]
0.3
0.[2D]
0.27
0.[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/n}
1/2
1/3
1/4
1/5
1/6
1/7
1/8
1/9
1/10
1/11
1/12
1/13
1/14
1/15
1/16
1/17
1/18
1/19
1/20
1/21
1/22
1/23
1/24
1/25
1/26
1/27
1/28
1/29
1/30
2
^{1}_{0}
^{0}_{2}
^{2}_{0}
^{0}_{4}
^{1}_{2}
^{0}_{3}
^{3}_{0}
^{0}_{6}
^{1}_{4}
^{0}_{10}
^{2}_{2}
^{0}_{12}
^{1}_{3}
^{0}_{4}
^{4}_{0}
^{0}_{8}
^{1}_{6}
^{0}_{18}
^{2}_{4}
^{0}_{6}
^{1}_{10}
^{0}_{11}
^{3}_{2}
^{0}_{20}
^{1}_{12}
^{0}_{18}
^{2}_{3}
^{0}_{28}
^{1}_{4}
3
^{0}_{1}
^{1}_{0}
^{0}_{2}
^{0}_{4}
^{1}_{1}
^{0}_{6}
^{0}_{2}
^{2}_{0}
^{0}_{4}
^{0}_{5}
^{1}_{2}
^{0}_{3}
^{0}_{6}
^{1}_{4}
^{0}_{4}
^{0}_{16}
^{2}_{1}
^{0}_{18}
^{0}_{4}
^{1}_{6}
^{0}_{5}
^{0}_{11}
^{1}_{2}
^{0}_{20}
^{0}_{3}
^{3}_{0}
^{0}_{6}
^{0}_{28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}_{8}
^{0}_{1}
^{1}_{0}
^{0}_{2}
^{0}_{6}
^{0}_{10}
^{0}_{22}
^{0}_{2}
^{0}_{10}
^{0}_{12}
^{0}_{3}
^{0}_{6}
^{0}_{28}
^{0}_{2}
20
^{1}_{0}
^{0}_{2}
^{1}_{0}
^{1}_{0}
^{1}_{2}
^{0}_{2}
^{2}_{0}
^{0}_{6}
^{1}_{0}
^{0}_{5}
^{1}_{2}
^{0}_{12}
^{1}_{2}
^{1}_{2}
^{2}_{0}
^{0}_{16}
^{1}_{6}
^{0}_{1}
^{1}_{0}
^{0}_{2}
^{1}_{5}
^{0}_{22}
^{2}_{2}
^{2}_{0}
^{1}_{12}
^{0}_{18}
^{1}_{2}
^{0}_{7}
^{1}_{2}
21
^{0}_{1}
^{1}_{0}
^{0}_{1}
^{0}_{1}
^{1}_{1}
^{1}_{0}
^{0}_{2}
^{2}_{0}
^{0}_{1}
^{0}_{2}
^{1}_{1}
^{0}_{4}
^{1}_{1}
^{1}_{1}
^{0}_{4}
^{0}_{4}
^{2}_{1}
^{0}_{18}
^{0}_{1}
^{1}_{0}
^{0}_{2}
^{0}_{22}
^{1}_{2}
^{0}_{5}
^{0}_{4}
^{3}_{0}
^{1}_{1}
^{0}_{28}
^{1}_{1}
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 = 2^{2}, base 8 = 2^{3} and base 9 = 3^{2}.
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?
{ expression | condition } is the set of all numbers described by the
expression
but subject to, or generated by, the given condition. For example: {2^{i}3^{j}|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=10^{3}
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 2^{i}×5^{j} will always be a factor of 10^{i×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
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
What is ^{1}/_{2} in bases 2 to 12?
Write your result mathematically.
1/2_{2b+1} = 0.[b]
1/2_{2b} = 0.b
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
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.
π = 3.141592653589793... proved irrational by Lambert in 1761
Φ = Phi = 1.6180339887..., φ = phi = 0..6180339887... the golden ratios
e = 2.718281828459045..., the base of natural logarithms, proved irrational by
Euler in 1737 who also introduced the use
of the letter e for this number.
If r is irrational then so are the following
for any positive or negative rationalsk, ℓ
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 .
If x is a root of an equation
x^{m} + c_{1} x^{m–1} + c_{2} x^{m–2} +
... + c_{m}= 0
where the c_{i} are integers of which the first is 1,
then x is either an integer or is irrational.
Since √2 is a root of x^{2} – 1 = 0
and is clearly not an integer, then this Theorem shows it must be irrational.
Also, ^{k}√n is a root of x^{k} – 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
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.
]
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 = p^{2}/q^{2}
Multiplying by q^{2}: 2 q^{2} = p^{2} ........... (2)
So we see that p^{2} is even and therefore
p is even and we can write it as
p = 2 k.
Putting this in (2) we have 2 q^{2} = (2k)^{2} = 4 k^{2}
Dividing by 2: q^{2} = 2 k^{2}
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 2^{3}=8, 3^{3}=27, 4^{3}=64, ...
A000578
the fourth roots of any non-fourth-power number.
and so on for all the n^{th}-roots of non-n^{th}-powers...
2, 3, 5, 6, 7, 10, 11, 12, 13, 14, ... A007916
where we omit 2^{2}=4, 2^{3}=8, 3^{2}=9, 2^{4}=4^{2}=16, 5^{2}=25,
3^{3}=27, 2^{5}=32, 6^{2}=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 x^{2} + b x + c = 0.
Here solutions involve square-roots in general and sometimes square-roots of negative numbers, which leads us
to complex numbersx + 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)} F_{ai} where F_{ai} 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.