How many of the first $100$ terms are the same in the arithmetic sequences $2,9,16,\ldots$ and $5,11,17,\ldots$? 
If $\{a_n\}$ is an arithmetic sequence with 100 terms where $a_1=2$ and $a_2=9$, and $\{b_n\}$ is an arithmetic sequence with 100 terms where $b_1=5$ and $b_2=11$, how many terms are the same in each sequence?

I think the answer is 17, but how I got it seemed too easy and I just want someone to verify my answer. Here is how I found my solution:
The sequence for
$$a_n= 2, 9, 16, 23, 30, 37, 44, 51, 58, 65, 72,79,86,93,100,107,114,121,\ldots$$
The sequence for
$$b_n= 5, 11,17, 23, 29, 35, 41, 47, 53, 59, 65, 71,77,83,89,95,101,107, \ldots$$
Ignoring the 1st four terms, I noticed that after the 4th term, the same terms appear in every 6th term for $a_n$ and 7th term for $b_n$. Therefore, $100-4=96/6=16$. Then I added $1$ to include $23$.
I hope this makes sense and thank you for your help.

The general formulas for the terms are:
\begin{align*}
a_{n} = 2 + (n-1)7 = 7n - 5 \\
b_{n} = 5 + (n-1)6 = 6n - 1
\end{align*}
We are looking for two integers $x$ and $y$ such that:
\begin{align*}
a_{x} &= b_{y} \\
7x - 5 &= 6y - 1 \\
x &= \frac{6y + 4}{7} \\
\end{align*}
In other words we are looking a integer $y$ such that $x$ is a also an integer. Meaning that $6y + 4$ is a multiple of $7$.
\begin{align*}
6y+4 &= 0 \mod 7 \\
6y &= -4 \mod 7 \\
6y &= 3 \mod 7 \\
2y &= 1 \mod 7 \\
2y &= 8 \mod 7 \\
y &= 4 \mod 7 \\
\end{align*}
Therefore $y$ leaves a remainder of $4$ when divided by $7$ and can be written in the form $y=7k+4$. For example, when $k = 0$, we get the pair $y = 4$ and $x = 4$ ($a_{4} = b_{4}$). When $k = 1$, we get the pair $y = 11$ and $x = 10$ ($a_{10} = b_{11}$). The largest $k$ we can plug in before $y$ is above $100$ is $13$, meaning that in total with $k = 0$ there are $14$ possible values of $k$ and $14$ terms in both sequences.
