sequences and divisability

jimmo

New member
Joined
Feb 14, 2007
Messages
1
first posting and didnt know where else to put it.
Seems simple but cant figure it out.

I have 2 sequences as follows;

Sequence1: 26-4,26-8,26-12....etc
and
Sequence2: 16-30,40-30,72-30...etc

What I want to find is the first number at which sequence1 divides
into sequence2 with no remainder (Mod);

To clarify using above example

16-30=-14 26-4=22 => -14/22 not correct
40-30=10 26-8=18 => 10/18 not correct
72-30=42 26-12=14 => 42/14=3
3 is the first whole number with no mod. This is the answer I'm
looking for. However with larger sequences this trial and error
method is slow and cumbersome so I was wondering if there was an
easier way to solve this.

Example 2

Sequence1 = 42-4,42-8,42-12,42-16....etc
sequence2 = 28-44,64-44,108-44,160-44....etc

Once again using trial and error to find seq2/seq1
28-44/42-4=-16/38
64-44/42-8=20/34
108-44/42-12=64/30
160-44/42-16=116/26
220-44/42-20=176/22=8 correct answer no Mod

Based an above what I am trying to do is create an equation which I can feed in the initial numbers, knowing how both sequences are decreasing/increasing and identify the first whole number once seq2/seq1. Would save me a lot of time as per above trial and error wit big numbers takes a long time.

cheers for your help.
 
Top