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.
A quick look at what's on this page ...
Decimal Fractions are the string of digits after the decimal point that are the same as a fraction.
For example: 1/2 = 0.5 is a terminating fraction of a single decimal place 5/12 = 0.4166666... is a recurring fraction where the 6's at the end go on for ever 1/27 = 0.0037037037037 is recurring and the length of the repeating part ( a period) is 3 digits.
Section 3 answers the question: How can we convert a decimal into a fraction?
The longest period a fraction can have is determined just by the denominator (the bottom number of a fraction).
Which denominators
have the longest periods?
This leads us into some nice number "magic" in the Cyclic numbers.
If you only want a quick look at this page, then start here. Cyclic numbers are quite rare.
Every multiple of
a cyclic number is just the same digits (re-)cycled round but in the same order.
For example 142857 Try it!
For the more serious mathematician,
we know little about them and there is much to research here
Some fractions have a decimal expansion that is a recognisable series of numbers, such as 1/98 = 0.01 02 04 08 16 32 64 ...: the powers of 2! 1/199 = 0.0 05 25 125 ... 64 32 16 08 04 02 01 then starts again
with the powers of 5 at the front of the period and the powers of 2, backwards, at the end.
This is the largest section on this page and aims to find the patterns that give a fraction from a series.
Finally we look at bases other than base 10, such as fractions in binary or base 127.
and don't forget that there are several
Calculators
here that work to any number of decimal places
... and the You do the maths... quizzes and questions to investigate the maths for yourself.
Abbreviations used on this page:
fraction usually means the fraction "in its lowest terms" so that there is no divisor
common to the numerator (on top) and the denominator (underneath the line) except the number 1.
8/12 is the same value as 4/6 and 2/3 but the last is the one is in "lowest terms" and is the form
used for results and calculations on this page.
dp : decimal places and also the number of "digits" in other bases apart from 10
# : "the number of" for example #factors means "the number of factors"
Decimal fraction refers to the digits found from dividing the numerator by the denominator.
It is used not just for digits in base 10 but in other bases too.
There is no other convenient word (Hardy and Wright The Theory of Numbers)
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
You do the maths... section of questions to start your own investigations.
The calculator icon
indicates that there is a live interactive calculator in that section.
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:
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.
Their denominators are 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, ...
A003592
Others become an endlessly repeating cycle of the same digits - those in the right-hand columns
- such as 1/3, 1/7, 1/9.
Their denominators are called recurring (or repeating) decimal fractions.
Decimal fractions that are purely 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.
Their denominators are
3,7,9,11,13,19,21, ... A045572
and are all the numbers ending in 1, 3, 7 or 9.
The rest start off with a fixed part, a finite series of digits before
they too eventually settle down to an endless repetition of the same digits, the recurring part
for example:
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 and are the rest of the
numbers that are neither denominators of purely repeating fractions nor denominators of terminating fractions:
Their denominators are 6, 12, 14, 15, 18, 22, 24, 26, 28, 30, 34, ...
A105115
At first it is surprising that every fraction fits into one of these three 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 several notations to
indicate which of the digits in a decimal fraction are in the repeating part
(the period or recurring part or cycle):
a dot is put over the first and last digits in the recurring sequence (or sometimes over each of the digits in the period)
This notation goes back at least to Robertson (1768)
.
.
1/7 = 0.142857 142... = 0.
1
4285
7
.
.
3/44 = 0.06818181... = 0.06
8
1
.
2/3 = 0.66666...= 0.
6
a line is drawn over the repeating part 1/7 = 0.142857
3/44 = 0.0616
2/3 = 0.6
Both of these are a little awkward on web pages and in the output from
computer programs and calculators, so an alternative is also used:
bracket the recurring part with square brackets [ and ]
1/7 = 0.[142857]
3/44 = 0.06[16]
2/3 = 0.[6]
On this page and in the Calculators we will use the [ ] notation .
Here is a question to test your understanding of the bracket notation:
You do the maths...
Which of these decimal fractions is not the same as
0· 123 123 123 ...? [Press the button to check your answer.]:
0.[123]
This is 0. 123 123 123 123 ...
0.123 [123]
This is another way of writing 0. 123 123 123 123 ...
0.1[231]>
This is 0. 1 231 231 231 231 ... which is the same
0.1[23123]
Correct! This is 0. 1 23123 23123 ... and is not
the same as 0. 1231231231231...
0.12[312]
This is 0. 12 312 312 312 ... which is the same
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!
You do the maths...
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 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]
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
Fraction to Decimal C A L C U L A T O R
decimal places in base
R E S U L T S
Which decimal fractions terminate and which recur?
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
MAX(α, β) decimal places
where the MAX(α, β) function
means the largest of α 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, 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
106mod 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 some 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 = 2a1 5a2 p1b1 p2b2 ...
where the pi are prime numbers other than 2 and 5
and a1 or a2 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,
Fixed and Recurring
where
d = F × R where F includes only the prime factors 2 and/or 5
or else is 1 and R is the rest of the prime factors
or else is 1.
The size of the fixed part is determined solely by the factor F The size of the recurring part is determined by R. 1/R 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 F = 22, R = 3
The fixed part is determined by F = 22 = 4 and
1/4 = 0.25 has 2 decimal digits.
The recurring part is determined by R= 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 F = 2, R = 19
The fixed part is the same length as 1/F = 1/2 = 0.5, 1 digit.
The recurring part is the same length as 1/R = 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 F = 2 × 53, R = 7 × 11
The fixed part is given by F = 2 × 53 = 250
and 1/250 = 0.004 has 3 decimal digits.
The recurring part is determined by the rest of the factorisation: R = 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 easiest way to find F and R for a given denominator d is to repeatedly find g, the GCD of 10 and d,
then divide d by g and repeat until the GCD is 1. We then multiply together all the g's which is F. What is left in
d is the R part.
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
10k n will be divisible by d.
This only happens if the prime factors of d are also
prime factors of 10.
If n/dis 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.
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/108provided 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 the denominators of fractions with a given fixed part length and period length. Note that any numerator with these denominators will also have the same fixed and period lengths.
The denominators are restricted to a given maximum which can be a number up to 16 digits long.
Same denominator Decimal Fraction C A L C U L A T O R
Same denominator Decimal Fractions
with a denominator of
in base
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 numbersφ
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 φ 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 and written as φ.
Euler found some very important properties of φ(d)
that lead to a quick and efficient method of computing
it 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 to any pair of numbers with no common factor:
If gcd(a,b)=1 then φ(a b) = φ(a)
φ(b)
φ(pa)
= pa – pa − 1
= pa − 1(p − 1)
= pa − 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, ... pa-p, pa
and there are pa–1 of these. Hence φ(pa) = pa – pa–1
φ(na)
= na–1φ(n) for all n
This follows because φ(n) is multiplicative
and from the previous property.
φ(p1a1 p2a2 ... pkak)
= φ(p1a1) φ(p2a2) ...
φ(pkak)
for primes pi
This looks daunting but it merely means that we split a number into its separate prime factors
pi with their powers ai
and find the φ count
for each of these piai,
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 = 2a × 5b
( a and b may be 0)
and the length of its (terminating) decimal is LCM( a, b )
which we saw above.
So, given a length t of a terminating decimal fraction we need
to find a and b with
LCM( a, b ) = t. This means that both
a and b are among the
factors of t
or else one of them is 1 and the other is t.
For example, if t = 2, we have
a
2a
b
5b
d = 2a×5b
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 symbol used for the length of the period of the decimal expansion of 1/d
is the Greek lowercase letter lambda for length: λ. λ 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 10n–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, 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 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 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
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 only
each having a denominator of 10.
But when reduced to their lowest terms, there are only 3 possible denominators for these fractions: 2, 5 and 10.
Similar sized Decimals C A L C U L A T O R
denominators up to
for decimals with
fixed part of length
and period of length
in base
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.
Alternative forms for some recurring fractions
There are different ways to write the same recurring decimal fraction,
for instance
0.00010101010... could be written 0.000[10]
or, equally correctly, as 0.00[01].
This does not make much of a difference for this number but for other numbers such as 1/11
it does!
Mathamaticians choose one of two conventions: use the longest or the shortest
fixed part.
In the software package
Mathematica
the results from the RealDigits function)
uses the longest fixed part and so starts a recurring part with a non-zero digit: 1/11 = 0.0[90].
This makes a difference because 1/11 = 0.0[90] is a mixed recurring decimal fraction
with a fixed part of 1 digit and a period of two digits
whereas 1/11 = 0.[90] is a
purely recurring decimal fraction with no fixed part.
On this page, we use the shortest fixed part for all recurring decimals in any base.
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).
Don't forget to type in all initial and trailing zeroes!.
If your base is bigger than 10, type in the "digits" as a number but leave a space between the "digits"
Decimal to Fraction C A L C U L A T O R
0·
[ ]
in base
R E S U L T S
You do the maths...
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
Fractions with maximum length periods
We know that all denominators D that recur that have a period of at most D-1 digits.
Those with the maximum length: D-1 digits (regardless of the base) are always primes and
are called
maximal length primes or long primes or full repetend primes.
For instance, in base 10, we have
Such maximal D are always prime and the series of denominators begins
7, 17, 19, 23, 29, 47, 59, 61, 97, 109, … A001913
The cyclic numbers themselves are
142857, 588235294117647, 52631578947368421, ... A180340
but this does not show the initial zeroes which you must remember to include when rotating them!
Hardy and Wright's "Introduction to the Theory of Numbers" (see references)
on page 148 says that "very little is known about these".
However we do know all of these periods will have complementary halves meaning that the second half of the period (which will be of even length if it is maximal)
are the 9-complements of the first half, meaning that corresponding digits in each half will always sum to 9.
But even more than halves we have:
If the period length of 1/p, p a prime, has a factor A then
the total of all blocks of A digits of the period will always be
a multiple of 99..9: a number with A 9s.
For example, 1/19 = 0.[ 052631578947368421 ] has a period of 18 digits. We can sum these in block of size A:
Try it with one of the other maximal prime's periods :
1/17 = 0.[0588235294117647] or 1/19 = 0.[052631578947368421].
Remember that the inital zeroes are also needed!
The series of prime denominators is given in A001913
and their corresponding cyclic numbers are A004042
How common are maximal period fractions?
It seems they are quite common among the primes.
In 1927 the mathematician EilArtin conjectured
that the proportion of primes with maximal period is about 0.374 for all bases that are not a
power of a number.
The excluded bases are 4,8,9,16,25,27,32,36,49… A001597.
The precise value is as follows, where p runs through all the prime numbers:
2×1 - 1
3×2 - 1
5×4 - 1
7×6 - 1
...
p(p-1) - 1
... = 0.3739558136192...
2×1
3×2
5×3
7×6
p(p-1)
This is now called Artin's Constant and its decimal places
are given in A005596.
Mathematical Circus M Gardner, chapter 10 "Cyclic Numbers"
Solved and Unsolved Problems in Number Theory, D Shanks, (4th ed. 1993) pages 80-83.
The Book of Numbers J H Conway and R K Guy, (Springer-Verlag, 1996)
pages 157-163, 166-171
Maximal Period Fractions Calculator
Find denominators D of fractions with the maximal length of D-1 digits.
Maximal Period Fractions C A L C U L A T O R
maximal length periods
from
up to
in base
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:
Almost-maximal periods
If you look closely at the plots above, you will see the clear line of primes p that have a maximal period p-1.
The next line below them is of those (odd) numbers n whose period is (n-1)/2.
All the other points are below this line.
But....there are a few odd stragglers that lie in between the top two lines!
The smallest (in base 10) is 49 with a period of 42 and the next are 289, 343, 361, 529,...
A158248.
These are odd composite numbers with 10 as a primitive root:
49 = 72 and its period is 49 −7 and the period length of 1/7 is 6
289 = 172 with period 272 = 289 − 17. 1/17 has a maximal length period
343 = 73 with period 294 = 343 - 72. 1/343 is a maximal period fraction
361 = 192 with period 342 = 362 − 19
and so on for the others in this series
They are all powers of a maximal period prime, but not all powers
of maximal prime are in this list, for example 4872 = 237169 has a period of 486 (below the
half-way line) which is the same as the period for 487, making 487 a maximal period prime.
Decimal fractions that look like special sequences
1/7 = 0.[142857] = 0.[14 28 57] and 14, 28 and 56(oops!?!) are 14, 2×14, 4×14
1/19 = 0.[ ... 8 4 2 1] which are the powers of 2 backwards.
In fact going back two more places we have
1/19 = 0.[ ... 6 8 4 2 1] and the next power of 2 after 8 would be 16 but this has two digits
It is amazing to find that there are even more fractions whose periods contain a special pattern
...
You Do The Maths...
Can you guess which simple fraction begins with the powers of 3:
0.01 03 09 27 ... ? Answer
1/97=0.[01 03 09 27 83 50 51 54 63 91 75 25 77 31 95 ...
And be prepared to be surprised at what the powers of 3 are with 1 dp each when summed as a decimal series! Answer
How about the powers of 2 but with 3 digits each: 0.001 002 004 008 016 032 ...?
Answer
1/98
However after a few more decimal places the series often get "muddled" (as we saw with 1/7 and 1/19 above)
and the pattern seems to disappear.
There must be some nice mathematical reason behind these patterns....
Which series appear in the period of a a fraction in this way?
For those, how can we find a fraction for a particular series?
This section unravels some of the simple maths behind these questions.
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?
You do the maths...
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:
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:
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
Use the Show button to display any number of decimal places, even thousands of dps if you want!
Select your series then press the
button it to set the fraction in the input boxes OR enter your own fraction
Then use the buttons below the fraction.
The and
buttons will expand or shrink the fraction boxes.
Series to Decimal Fraction C A L C U L A T O R
Series numbers have dps
in base
decimal places
in base
R E S U L T S
Summing powers in a decimal
You do the maths...
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 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:
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)
using the Greek letter tau.
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.
Start with the series of 1's
Let's look at the series
S = 1 + x + x2 + x3 + x4 +...
If we multiply S by x we have x S = x + x2 + x3 + x4 +...
But this is just S − 1 so S − 1 = x S
Collecting the S terms on the left: S − x S − 1 = 0 S(1 − x) − 1 = 0 S(1 − x) = 1
So S = 1/(1 − x):
1
= 1 + x + x2 + x3 + x4 +... starting with 1. (1)
1 − x
x
= x + x2 + x3 + x4 + x5... starting with 0. (2)
1 − x
Thie first equation (1) is just the formula for the infinite sum of a geometric progression (with x<1) starting with 1,x,x²,...
and the second is the formula for the series starting x,x²,... .
These are the basic formulas for our powers-in-a-decimal form
if we let
x = p/10d for powers of p with d digits per power.
It is also convenient to use x = 1/D and then D is bigger than 1 and formula (2) becomes
1/D
=
1
=
1
+
1
+
1
+ ... (3)
1 - 1/D
D − 1
D
D2
D3
If we look at powers of 10 in our decimal series so that D=100 in formula (3), we get
1
100
+
1
10000
+ ... = 0.01 01 01 01 ...
and this fraction is 1/D-1 = 1/99
Choosing different values for d, the number of places per item in the series, we have:
1
9
= 0. 1 1 1 1 ... (D=10)
1
99
= 0.01 01 01 01 01 ... (D=100)
1
999
= 0.001 001 001 001 ... (D=1000)
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
10d – 1
= 0. [k] if 0≤k≤10d-1
Add two series
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. 001 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 ...
1995×1000
995006
− 2
=
2494
497503
= 0.005 013 035 097 ...
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 Sum
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):
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:
Let's take a look at the series of square numbers1, 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:
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 = 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
=
1001
998001×999
997002999
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
...
1st Differences:
1
7
19
37
61
91
...
2nd Differences:
6
12
18
24
30
...
3rd 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)
Show why this works
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 in Summing a power series
we see 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.
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
The Fibonacci Numbers occur in many parts of mathematics as well as
in the patterns of seeds on flowerheads. They have a simple recursion rule:
Add the last two numbers to get the next, starting from 0 and 1 (or 1 and 1 or 1 and 2...):
0, 1,1, 2, 3, 5, 8, 13, 21, ... A000045
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
If we divide top and bottom by x², we have
P(x) =
1
1/x² - 1/x - 1
Now let X = 1/x and we have
P(X) =
1
X² – X –1
where X>1.
If we let x = 1/10 or X = 10 then we have 0 + 1/10 + 1/100 + 2/1000
+ 3/104 + ... = 0.011235... = 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 + ... = 0.010102030508... =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 =
.0
1
110 = 1
+
.0
0
1
1
111 = 11
+
.0
0
0
1
2
1
112 = 121
+
.0
0
0
0
1
3
3
1
113 = 1331
+
.0
0
0
0
0
1
4
6
4
1
114 = 14641
+
.0
0
0
0
0
0
1
5
10
10
5
115 = 15(10)(10)51 = 161051
+
...
=
.0
1
1
2
3
5
8
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
Did you notice that the Fibonacci rule describes how the digits of 1/19 grow?
1/19 is 0.[ 05 26 31 57 89 ...] the follwoing two-digt pairs being affected by carries from later numbers.
This section explores these General Fibonacci series-in-decimals.
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) = G(a,b,n) = a, b, a+b, 2a+b, 3a+2b, ... , a F(n-1) + b F(n), ...
is also G(a,b,n) = a F(n-1) + b F(n)
which we found on The General Fibonacci Numbers
page
Fractions with period which is the G(a,b,n) series
are generated by the fractions
a 10d + (b−a)
102 d – 10d – 1
the last fraction being for d digits per term. So for
d=1, 2, 3 we have
d:
1
2
3
Fraction:
9 a + b
89
99 a + b
9899
999 a + b
998999
You do the maths...
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 ... ?
What about bases other than base 10?
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
10
02
20
04
12
03
30
06
14
010
22
012
13
04
40
08
16
018
24
06
110
011
32
020
112
018
23
028
14
3
01
10
02
04
11
06
02
20
04
05
12
03
06
14
04
016
21
018
04
16
05
011
12
020
03
30
06
028
14
4
10
01
10
02
11
03
20
03
12
05
11
06
13
02
20
04
13
09
12
03
15
011
21
010
16
09
13
014
12
5
01
02
01
10
02
06
02
06
11
05
02
04
06
12
04
016
06
09
11
06
05
022
02
20
04
018
06
014
12
6
10
10
20
01
10
02
30
20
11
010
20
012
12
11
40
016
20
09
21
12
110
011
30
05
112
30
22
014
11
7
01
01
02
04
01
10
02
03
04
010
02
012
11
04
02
016
03
03
04
11
010
022
02
04
012
09
12
07
04
8
10
02
10
04
12
01
10
02
14
010
12
04
11
04
20
08
12
06
14
02
110
011
12
020
14
06
11
028
14
9
01
10
01
02
11
03
01
10
02
05
11
03
03
12
02
08
11
09
02
13
05
011
11
010
03
20
03
014
12
10
10
01
20
10
11
06
30
01
10
02
21
06
16
11
40
016
11
018
20
06
12
022
31
20
16
03
26
028
11
11
01
02
02
01
02
03
02
06
01
10
02
012
03
02
04
016
06
03
02
06
11
022
02
05
012
018
06
028
02
12
10
10
10
04
10
06
20
20
14
01
10
02
16
14
20
016
20
06
14
16
11
011
20
020
12
30
16
04
14
13
01
01
01
04
01
02
02
03
04
010
01
10
02
04
04
04
03
018
04
02
010
011
02
020
11
09
02
014
04
14
10
02
20
02
12
10
30
06
12
05
22
01
10
02
40
016
16
018
22
12
15
022
32
010
11
018
20
028
12
15
01
10
02
10
11
01
02
20
11
05
12
012
01
10
02
08
21
018
12
11
05
022
12
20
012
30
02
028
11
16
10
01
10
01
11
03
10
03
11
05
11
03
13
01
10
02
13
09
11
03
15
011
11
05
13
09
13
07
11
17
01
02
01
04
02
06
01
02
04
010
02
06
06
04
01
10
02
09
04
06
010
022
02
020
06
06
06
04
04
18
10
10
20
04
10
03
30
10
14
010
20
04
13
14
40
01
10
02
24
13
110
011
30
04
14
20
23
028
14
19
01
01
02
02
01
06
02
01
02
010
02
012
06
02
04
08
01
10
02
06
010
022
02
010
012
03
06
028
02
20
10
02
10
10
12
02
20
06
10
05
12
012
12
12
20
016
16
01
10
02
15
022
22
20
112
018
12
07
12
21
01
10
01
01
11
10
02
20
01
02
11
04
11
11
04
04
21
018
01
10
02
022
12
05
04
30
11
028
11
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.
maths 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: {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
Digits in bases greater than 10 are shown separated by a space:
0.12 in a base greater than 12 means a fixed length decimal of a single digit "12"
whereas 0.1 2 means two digits.
Decimal Fractions in any Base C A L C U L A T O R
showing up to periodic dps
with denominators
from
to
in bases
from
to
R E S U L T S
You do the maths...
What is 1/2 in bases 2 to 12?
Write your result mathematically. An answer 1/22b+1 = 0.[b]
1/22b = 0.b
Which denominators that are terminating in base 10 (decimal) are also terminating in base 2 (binary)? An answer
All of them because they are just the powers of 2
Find a formula for the fractions which, in binary, have a period of n 0s followed by n 1s
[Hint: use the Decimal to Fraction Calculator above] :
They start with 0.[01]=1/3, 0.[0011]=1/5 Answer
with n 0s and n 1s 0.[0..01..1]2 = 1 /( 2n + 1)
What if we started with n 1s followed by n 0s? Answer
with n 1s and n 0s 0.[1..10..0]2 = 2n /( 2n + 1)
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? An answer
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.
What do you notice about the digits of 1/(b-1) in base b? An answer
They are all 0.[1]
What do you notice about the digits of 1/(b-1)² in base b? An answer
They are all 0.[012...(b-3)(b-1)], omitting digit b-2
For instance, in base 10, 1/9² = 1/81 = 0.[012345679] omitting 8.
What are the maximal primes (those with the longest possible periods) less than 100
in base 2?
[Hint: Use the Maximal Period Fractions Calculator above] Answer
3, 5, 11, 13, 19, 29, 37, 53, 59, 61, 67, 83 A001122
Also known as the primes with a primitive root of 2
What operation on a fraction of a maximal prime will rotate its digits one place to the left cyclically?
Hence cycle the binary fraction for 1/13 in base 2 to find all its 12 multiples without recalculating the periods each time.
Multiple the fraction by the base
In base 2, rotating the period of 1/13 cyclically one place left each time, we have:
1/13 = 0.[000100111011]
2/13 = 0.[001001110110]
4/13 = 0.[010011101100]
8/13 = 0.[100111011000]
16/13 = 1+3/13, 3/13 = 0.[001110110001] : 2×8 = 16 ≡ 3 (mod 13)
6/13 = 0.[011101100010]
12/13 = 0.[111011000100]
22/13 = 1+11/13, 11/13 = 0.[110110001001] : 2×12 = 24 ≡ 11 (mod 13)
22/13 = 1 + 9/13, 9/13 = 0.[101100010011] : 2×11 = 22 ≡ 9 (mod 13)
18/13 = 1 + 5/13, 5/13 = 0.[011000100111] : 2×9 = 18 ≡ 5 (mod 13)
10/13 = 0.[110001001110]
20/13 = 1 + 7/13, 7/13 = 0.[100010011101]
14/13 = 1 = 1/13, .... and we start this list again!
Answer
Maximal primes in other bases
For a given prime p, the smallest base in which it is has the maximal period (of p-1 digits)
is called the least primitive root of the prime.
These are as follows:
prime
base
base decimal
2
3
0.[1]
3
2
0.[01]
5
2
0.[0011]
7
3
0.[010212]
11
2
0.[0001011101]
13
2
0.[000100111011]
17
3
0.[0011202122110201]
19
2
0.[000011010111100101]
23
5
0.[0102041332143424031123]
Apart from the prime 2, these bases form the series 2,2,3,2,2,3,2,5,2,3,2,6,... A001918
of the least primitive root of each prime.
There are many bases in which a prime denominator p is maximal - but not all.
There are no maximal period primes in bases that are a square number!
A Theorem by Fermat (published in 1640)
For a prime p which is not a factor of the base B, Bp-1 = 1 (mod p)
This means that 1/p for p a prime has a period of at most p-1 digits in a base where p is not a factor.
Reference:
Are there any other types of numbers that are not fractional?
Optional
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.
The irrational numbers
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... most
likely found 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
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, k√n 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.
You do the maths...
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 = 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
The Algebraic Numbers
One thing all the integers, the fractions and some irrational numbers have in common is that they are
all the roots of a polynomial. This includes
the solution to d x = n is x = n/d so x is any fraction (rational number)
the roots of quadratics such as x² = 2 of which x = √2
is a solution
cubics such as x³ = 7 for ³√7
all other n-th roots of numbers are solutions of xn = a for
a whole-number power n and a number a (whole or rational)
the golden ratios
√5 + 1
and
√5 − 1
2
2
which are solutions to x² = x + 1
a sum or difference of any of the above equations
a product of any of the above by a whole or rational number are also algebraic numbers
We usually put all the terms of the polynomial on one side and and
the values that make the expression 0 are called its roots.
Any number that is a root of a polynomial with integer or fractional coefficients is called
an algebraic number
The reason we insist on integer or fractional coefficients (of the powers of x) is that otherwise we could have the
equation
x = π
or any value we like!
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 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!
... and even more 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.
References
Mathematical Circus Martin Gardner,
(Penguin books, 1979 or Mathematical Assoc. of America 1996) chapter10 "Cyclic Numbers"
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
)
Repeating Decimals W G Leavitt The College Mathematics Journal 15 (1964) pgs 299-308
A useful overview of basic an interesting facts about repeating decimals with proofs
as also using them as an introductionto Fermat's Little Theorem and quadratic residues.
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.