Trigonometric Equation for a Sequence
Date: 04/03/2001 at 17:52:46 From: Jonathan Gruber Subject: Need an equation for a sequence I need an equation for the sequence of numbers: 0, 0, 1, 0, 0, 1, 0, 0, 1, ... I think it's a sine function with n starting at either n = 0 or n = 1. For example, if you start with n = 0, then the equation has to give you a value of 0, n = 1 gives you 0, n = 2 gives you 1, n = 3 gives you 0, n = 4 gives you 0, n = 5 gives you 1, n = 6 gives you 0, and so on. If you have n = 1 for the first number, you get a value of 0, and n = 2 gives you 0, n = 3 gives you 1, n = 4 gives you 0, n = 5 gives you 0, n = 6 gives you 1, n = 7 gives you 0, and so on. Thank you in advance!
Date: 04/03/2001 at 20:19:39 From: Doctor Schwa Subject: Re: Need an equation for a sequence Hi Jonathan, I would approach it more through complex numbers, but since you suggested sine, I'll work out something along those lines. Since it repeats with period 3, it should somehow be related to sin(2pi n/3) and cos(2pi n/3) so let's look at those (I'll round the decimals for convenience, and start with n = 0): sin(2pi n/3) = 0, .866, -.866, 0, .866, -.866, ... cos(2pi n/3) = 1, -0.5, -0.5, 0, -0.5, -0.5, ... That's not enough: to make the first two terms 0 and 0, I'd need to take 0 * sin + 0 * cos and it would be 0 forever. So I need another function of period 3. How about: sin(4pi n/3): 0, -.866, .866 ... Oh, that doesn't do any good, that's just the opposite of sin(2pi n/3). Maybe cos(4pi n/3)? No, that's just the same as cos(2pi n/3). Well, maybe I can make do with just the constant function. Let's try to make our sequence 0, 0, 1 by adding up A + B sin(2pi n/3) + C cos(2pi n/3) Plugging in n = 0, 1, 2 gives: A + + C = 0 A + .866B - 0.5C = 0 A - .866B - 0.5C = 1 Solving those equations will give you the solution you're looking for. I guess the point is we need three different functions that have period 3, and the constant (which really has period 1, but certainly does repeat after three steps) should be one of those functions. I do have another way of explaining why it should be a combination of a constant, sin, and cos, which uses complex numbers and a few other techniques; please do write back if you're interested in seeing it. - Doctor Schwa, The Math Forum http://mathforum.org/dr.math/
Date: 04/03/2001 at 22:49:31 From: Jonathan Gruber Subject: Re: equation for sequence Thank you, thank you, thank you! I can't thank you enough for your quick reply and explanation. It is of tremendous help! Now I can use that method to find equations of additional patterns, right? Yes, yes, I am interested in seeing the combination of the constant, sine and cosine. I am familiar with complex numbers. My teacher did tell my class that there are many ways of solving this problem. Again, I appreciate your help very much. Thank you, Jonathan Gruber
Date: 04/04/2001 at 01:34:20 From: Doctor Schwa Subject: Re: equation for sequence Hi Jonathan, I'm glad my reply was helpful! The complex number method works like this: You have a sequence that repeats every three steps. In other words, a(n+3) = a(n), where a(n) is the sequence function. Let's make a guess (I could try to explain why this guess is a good one, but that would take a long time): a(n) = r^n. In that case, r^(n+3) = r^n, or, dividing by r^n, r^3 = 1. That is, r is one of the cube roots of 1: r = 1, or (cos 2pi/3 + i sin 2pi/3), or (cos 4pi/3 + i sin 4pi/3). Then, any constant times r^n will be a solution, and in fact any sum of constants times any of the three choices of r^n will work too (you can check that fairly easily). So, the fully general form, with w = (cos 2pi/3 + i sin 2pi/3) for short, is A * 1^n + B * w^n + C * w^2n, where A, B, C might be complex numbers as well. Then plugging in n = 0, 1, 2 as before, you can find the values of A, B, and C for your sequence (you need three terms because after that the a(n+3) = a(n) rule determines the rest). When I teach this sequence of yours, instead of 0, 0, 1, I usually start it off 1, 2, 3 and call it the "waltzing sequence." The nice thing about this method in general is that it works with any linear equation of that type. For instance, it can be used to find a formula for Fibonacci numbers, for which F(n+2) = F(n+1) + F(n). Enjoy, - Doctor Schwa, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2013 The Math Forum