*pokes head into math thread*
Dammit, ninja'ed by rseldon.
Couple o' extra notes, if you want them:
- To be pedantic, if you want the proper math terms you're talking about a sequence, not a series.
A sequence is a list of numbers (which may or may not be gained by adding prior numbers in the list), whereas a series is the numbers in the sequence added together. So 3, 12, 24, 27, 39, 63, 66, 78... is a sequence, but 3+12+24+27+39+63+66+78... would be a series. (This is not important to answer your question, as it's clear what you mean, but I wanted to mention it in case it's important to you to get the term right in your book. Though of course these are VERY easy terms to mix up via a slip of the tongue, even sometimes by mathematicians!)
- @AngryGuy -- I think you might mean the Fibonacci sequence, not a Fourier series? (A Fourier series is a way of adding up a whole bunch of different sines and cosines to approximate a periodic wave.
Though maybe there's another usage I'm unfamiliar with! My first thought was also that this was adding recursively like Fibonacci, but it's not, because he's repeating the 3/12/24 additions over and over again.)
- rseldon already gives what I think is the quickest/most elegant solution. But just for fun, I also hit it with a really big hammer and got 100,020:
99918
99942
99945
99957
99981
99984
99996
100020
100023
100035
100059
100062
100074
100098
- Since you mentioned repeating decimals: You can actually re-derive the fraction for a repeating decimal in a really cool way by using series (series, not sequences!). Take the one you mentioned:
0.8571428571428571...
Say I don't know what fraction this is but I want to. I can rewrite it as:
.857142 + .000000857142 + .000000000000857142 + ...
(^^ series, not sequence, because I'm adding
)
Then I can very easily rewrite those as fractions. Just think about the way we say decimals verbally: we say .3 as three-tenths, which is 3/10, and .78 as seventy-eight-hundredths or 78/100, and .845 as 845-thousandths or 845/1000...the base ten system gives us a very quick conversion. So I get:
857142/1000000 + 857142/1000000000000 + 857142/1000000000000000000 + ...
This is an infinite geometric series, which means you get every term in the series by multiplying the previous one by the same number r -- in this case, r = 1/1000000, or one one-millionth.
The fact that we started out with a decimal, which we think of as a number already, might give away the punchline, but here's the really fascinating thing -- ANY geometric series with |r|<1
converges, which means the infinite series adds up to a number. We're adding up
an infinite number of terms, and instead of getting infinity,
we're going to get a number. WILD, huh?! The basic gist of this is that, in some sense, the terms are getting smaller "fast enough" that we'll never reach above a certain finite limit.
ANYWAY. So how do we find this number? Understanding the formulas is actually not too hard -- all you need is basic algebra and the very beginnings of calculus (as in, so beginning that you don't need to know calculus to see it
). You can get the formula for the nth partial sum of a geometric series -- that is, if we add up the first n terms -- like so:
Sum of geometric series from term 1 to term n, with first term
a and common ratio (multiplier)
r =
a (1 - r^n) / (1 - r)
The derivation for this is, believe it or not, nothing more than rearranging some terms. But it's rather lengthy so if you're interested I leave you in the capable hands of Google.
Now, to get the sum of an
infinite series, we want to sum from 1 to infinity. So if we take the limit as n goes to infinity in the formula above, as long as |r|<1 the term r^n goes to 0. This is pretty easy to see even if you haven't had calculus: if we take a fraction and we keep raising it to a higher and higher power, it'll get smaller and smaller. Like take 1/10 and square it, cube it, etc. -- you get 1/100, 1/1000, 1/10000, etc.. So if r is a fraction and we raise it to a REALLY BIG power, we drop off to 0. Which means when we go all the way out to infinity, our formula becomes:
S = a (1 -
0) / (1 - r)
= a (1) / (1 - r)
= a / (1 - r)
as long as r is a fraction.
So going back to our repeating decimal:
857142/1000000 + 857142/1000000000000 + 857142/1000000000000000000 + ...
is an infinite series with a = 857142/1000000 (the first term) and r = 1/1000000. We can put those values into the above formula to get:
S = a / (1 - r)
S = (857142/1000000)/(1 - 1/1000000)
= (857142/1000000)/(999999/1000000)
= (857142/1000000)*(1000000/999999)
= (857142/
1000000)*(
1000000/999999)
= 857142/999999
= 6/7.
COOL, huh?
ANY repeating decimal can be converted back into a fraction this way. (Side note: you often learn in school about the rational and irrational numbers, and they'll say something like rationals include "fractions, terminating decimals, and repeating decimals." Really that's redundant -- rationals are any numbers that can be written as fractions*, full stop, end of (this is the definition mathematicians use). Because any terminating or repeating decimal
can be written as a fraction -- for a repeating decimal as above, and a terminating decimal is even easier; as aforementioned .398 would be 398/1000 and then simplify -- these types of decimals are indeed all rational.)
...
...
...
*looks at number of words I just wrote that weren't even on topic*
*considers deleting*
...
...
*slinks back to writing*
* eta: right here I've used "fraction" to mean "proper or improper fraction," as in, the ratio of two integers, whereas I think everywhere else in this post I've used "fraction" to mean "proper fraction," as in, absolute value smaller than 1. Hopefully that is perfectly non-confusing in context, but I'm adding a note for pedantry's sake.