Question 1006513
find the number of common terms in two APs 7, 11, 15, .....up
to 403 and 9, 16, 23 ...up to 702
<pre>
This may be a bit confusing because within each arithmetic
sequence we will be dealing with another arithmetic sequence
whose terms are the term numbers of the terms in each 
arithmetic sequence.

The Kth term of 7,11,15,... is 4K+3
The Mth term of 9,16,23,... is 7M+2

When we set 4K+3 = 403 we get K=100 and when we set
7M+2=702, we get M=100, so we are limiting both 
sequences to 100 terms. 

We set their general terms equal

 4K+3 = 7M+2
    1 = 7M-4K
7M-4K = 1
 
The smaller coefficient in absolute value is 4, so we write
the numbers in that Diophantine equation in terms of their
nearest multiple of 4, including 0 as the nearest multiple 
of 4 to 1:

(8-1)M-4K = 1
  8M-M-4K = 1

We divide every term by 4

2M-M/4-K = 1/4

Get fractions on the right side

2M-K = M/4+1/4

The left side is an integer and the right side is positive, so
both sides are equal to a positive integer, say A.

2M-K=A;        M/4+1/4=A
  -K=A-2M          M+1=4A
   K=-A+2M           M=4A-1
   K=2M-A            

Substitute 4A-1 for M in K=2M-A

   K=2(4A-1)-A
   K=8A-2-A
   K=7A-2

So for each positive integer A, term #(7A-2) of the first
sequence equals term #(4A-1) of the second sequence.

7A-2 is an arithmetic sequence of term numbers of the first
sequence.  It has common difference 7, and first term 5.

4A-1 is an arithmetic sequence of term numbers of the second
sequence. It has common difference of 4, and first term 3.

That means the 5th term of the first sequence equals the 3rd
term of the 2nd sequence.

And in general the arithmetic sequence of term numbers of the
first sequence:

5th, 12th, 19th,...,(7A-2),...
where A=1,2,3,...

equal respectively to the sequence of terms numbers of the 
second sequence:

3rd, 7th, 11th,...,(4A-1)...
where A=1,2,3

Since we are limited by the 100th term of both sequences, and
there are fewer term numbers (7A-2) in the first sequence than
there are term numbers (4A-1) in the second sequence, we set 

7A-2 <= 100
  7A <= 102
   A <= 14 4/7

Thus the number of term numbers of the terms of the first sequence 
which equal terms of the second sequence is the largest integer not
exceeding 14 4/7 which is 14.

Answer: 14

Edwin</pre>