HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

need help getting the equation for a sequence

03-24-2005, 09:13 AM#1
Lil Blue Smurf
Okay, it has been like 6 years since I had to do anything like this, so I having trouble figuring out equations for these two sequence:

Code:
sequence 1
n= 2 | 7 | 12 | 17 | 22
x= 1 | 5 |  9 | 13 | 17

sequence 2
n= 1 | 6 | 11 | 16 | 21
x= 1 | 5 |  9 | 13 | 17


Just need the x=f(n) type thing... thats probably not even the right notation... and I was in advanced calc.... damn...
Anyways, if I get it before someone else posts I'll let you guys know.

Basically I am using it to determine the link number between two 'nodes'

Code:
(x) = node
X = link


( 1)- 1-( 2)- 2-( 3)- 3-( 4)- 4-( 5)
  |       |       |       |       |
 21      22      23      24      25
  |       |       |       |       |
( 6)- 5-( 7)- 6-(8)- 7-(9)- 8-(10)
  |       |       |       |       |
 26      27      28      29      30
  |       |       |       |       |
(11)- 9-(12)-10-(13)-11-(14)-12-(15)
etc etc


This is for the left and right of a node, I already have top and bottom.
03-24-2005, 12:00 PM#2
Anitarf
Math problems, my favourite!
We are obviously dealing with linear sequences here, now let's see:


sequence 1 (left link from a node in column 2):

n= 2 | 7 | 12 | 17 | 22
x= 1 | 5 | 9 | 13 | 17

x = (((n - 2) / 5) x 4) + 1


sequence 2 (right link from a node in column 1):

n= 1 | 6 | 11 | 16 | 21
x= 1 | 5 | 9 | 13 | 17

x = (((n - 1) / 5) x 4) + 1


however, it's different in the next column:

sequence 3 (left link from a node in column 3):

n= 3 | 8 | 13 | 18 | 23
x= 2 | 6 | 10 | 14 | 18

x = (((n - 3) / 5) x 4) + 2

The difference between sequence 1 and sequence 3 is is in the first number we substract from n, and in the last number we add, they both increase by 1. The value of (n mod 5) also increases by 1, so we can use it to determine the final general equations:

x = (((n - (n mod 5)) / 5) x 4) + (n mod 5) - 1 (left link from a node in any column (except the first one))
It just happens to be that this equation is the same for the link to the right of any node (except the last one)
03-24-2005, 12:23 PM#3
Lil Blue Smurf
Thanks man, it's been ages and I completely forgot how to go about solving those :P
need help getting the equation for a sequence - Wc3C.net