PDA

View Full Version : Number Series: 3, 12, 24, 27, 39, 63, 66, 78 . . . 100,0XX ?



Ken
07-05-2014, 05:04 PM
Is there a formula to predict what the nth occurrence in a number series like the one above would be?

The series in question has three main numbers (3, 12, 24) successively added to the last in the ongoing series:

24 + 3 = 27
27 + 12 = 39
39 + 24 = 63
63 + 3 = 66
66 + 12 = 78
78 + 24 ...

I need to know what the first one with six digits would be in the series.

e.g. 100,003 or 100,020 etc.

The numbers between the first in the series and the six digit one aren't needed.

King Neptune
07-05-2014, 05:40 PM
Is it an arithmetic series? If it is than is a formula for it, and you should be able to solve it for any term in the series.
Is the formula something like a, b, c, c+3, (c+3)+12, (c+12)+24, and so on?

rseldon
07-05-2014, 05:47 PM
Okay. If after 24 you're always successively adding 3, then 12, then 24, then the 3n'th term after 24 will equal 24 + 39n (since 3 + 12 + 24 = 39.) So if we find the largest number of the form 24 + 39n below 100,000 then we can count up from there.

24 + 39n < 100,000 gives 39n < 100,000-24 = 99,976, which gives us n < 99,976/39.

This comes out to 2,563 plus some stuff after the decimal. So the biggest term in your sequence below 100,000 should be 39*2,563 + 24 = 99,981

So your next terms will be:

99,981 + 3 = 99,984
99,984 + 12 = 99,996
99,996 + 24 = 100,020 so this is your first six-digit term.

Dennis E. Taylor
07-05-2014, 06:01 PM
It sounds vaguely like a Fourier Series. You can express it as an equation, but you can't "solve" it the way you'd solve something algebraic. For the record, your answer is:

99996
99999
100011
100035
100038
100050

I just wrote a short program:

static void Main(string[] args)
{
int n = 0;
int[] z = { 3, 12, 24 };
int a = 0;
while (n < 100050)
{
n += z[(a++) % 3];
Console.WriteLine(n);
}
Console.ReadLine();
}

Sometimes, just hitting it with a big hammer is good enough. :D

rseldon
07-05-2014, 06:05 PM
It sounds vaguely like a Fourier Series. You can express it as an equation, but you can't "solve" it the way you'd solve something algebraic. For the record, your answer is:

99996
99999
100011
100035
100038
100050

I just wrote a short program:

static void Main(string[] args)
{
int n = 0;
int[] z = { 3, 12, 24 };
int a = 0;
while (n < 100050)
{
n += z[(a++) % 3];
Console.WriteLine(n);
}
Console.ReadLine();
}

Sometimes, just hitting it with a big hammer is good enough. :D

Not quite -- he's starting the +3, +12, +24 additions from 24, not from 0. I did the same thing at first.

Ken
07-05-2014, 06:15 PM
Okay. If after 24 you're always successively adding 3, then 12, then 24, then the 3n'th term after 24 will equal 24 + 39n (since 3 + 12 + 24 = 39.) So if we find the largest number of the form 24 + 39n below 100,000 then we can count up from there.

24 + 39n < 100,000 gives 39n < 100,000-24 = 99,976, which gives us n < 99,976/39.

This comes out to 2,563 plus some stuff after the decimal. So the biggest term in your sequence below 100,000 should be 39*2,563 + 24 = 99,981

So your next terms will be:

99,981 + 3 = 99,984
99,984 + 12 = 99,996
99,996 + 24 = 100,020 so this is your first six-digit term.

Thanks. That's awesome! 100,020 it is.

Thnx also King and Angry for the added feedback.

Series are fascinating in their own right.

I particularly like those formed by dividing numbers :

6/7 = 0.8571428571428571...

Particularly ones resulting in not repeating series.

Wild how they go on forever.

rseldon
07-05-2014, 06:19 PM
Thanks. That's awesome! 100,020 it is.

Thnx also King and Angry for the added feedback.

Series are fascinating in their own right.

I particularly like those formed by dividing numbers :

6/7 = 0.8571428571428571...

Particularly ones resulting in not repeating series.

Wild how they go on forever.

Yep. They're good stuff, aren't they? :) Glad I could help.

slhuang
07-05-2014, 08:37 PM
*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. :D

Ken
07-05-2014, 09:11 PM
I sorta get the gist of all that. Will have to consider it some more. Really interesting.

Knowing it's a sequence may help as a descriptor.

*slinks away from writing and considers pursuit of mathematics instead*

seriously interesting

Thanks !

Bufty
07-05-2014, 10:34 PM
As I read this thread I felt as though my desk, my keyboard and my screen were getting larger and larger and larger.....

Bufty tiptoes quietly out of thread, closing the huge door as carefully as possible.

Dennis E. Taylor
07-05-2014, 11:09 PM
- @AngryGuy -- I think you might mean the Fibonacci sequence, not a Fourier series?

You're right. I was having alliterative ataxia. I plead insufficient coffee! (Yeah, that's the ticket...)

slhuang
07-06-2014, 12:44 AM
seriously interesting

Thanks !

Cool! I'm very glad your reaction was to find it interesting rather than "WTH get out of my threeeeeead...!" :D ;)


As I read this thread I felt as though my desk, my keyboard and my screen were getting larger and larger and larger.....


mwahahahahahaha!

(This is what we mathematicians love about mathematics. Exactly that feeling. ...and then we TAKE OVER THE WORLD!!!)


You're right. I was having alliterative ataxia. I plead insufficient coffee! (Yeah, that's the ticket...)

Heh, if you knew the number of times I've made similar word slips...including on exams! :o

rseldon
07-06-2014, 03:53 AM
*pokes head into math thread*

Dammit, ninja'ed by rseldon.


:D

Thanks for your additional notes. Realizing I'd forgotten to be pedantic about series vs sequences was a "Wow, I have been out of academia for a while" moment.

And infinite geometric series should be welcome anywhere.


As I read this thread I felt as though my desk, my keyboard and my screen were getting larger and larger and larger.....

Bufty tiptoes quietly out of thread, closing the huge door as carefully as possible.

:roll: But, but, but this is a nice friendly corner of mathematics. I promise!

Don't mind slhuang, she's just TAKING OVER THE WORLD actually I have no idea what she's doing. But I'm sure it's harmless. ;)

MagicWriter
07-11-2014, 08:19 AM
I think my brain just exploded.

benbradley
07-11-2014, 08:51 AM
Yay for turning coffee into theorems!