I came across the linear congruential generator on Wikipedia:
http://en.wikipedia.org/wiki/Linear_congruential_generator
I gather that for a particular choice of the modulus, multiplier and increment, the generator would generate a unique sequence. However, is there any way to determine the values of modulus, multiplier and increment that I need to create a particular finite sequence?
For instance, if I chose the modulus as 8, the multiplier as 1, and the increment as 5, I obtain the sequence 5, 2, 7, 4, 1, 6, 3, 0, assuming a seed value of 0. Now if I wanted the sequence 2, 11, 5, 9, 6, 22, how do I determine what values of the parameters to choose?
This is not a full solution, but something that may help. Let $a_n, n=1,2,3,\ldots$ be your sequence, and fix a natural number $k$. Then the vector $(a_{k+1},a_{k+2},a_{k+3})$ is a linear combination of the vectors $(a_k,a_{k+1},a_{k+2})$ and $(1,1,1)$ modulo the modulus $=N$, because the same (affine) linear mapping always gives the next entry. Therefore the determinant $$ \left|\begin{array}{lll} 1&a_{k}&a_{k+1}\\ 1&a_{k+1}&a_{k+2}\\ 1&a_{k+2}&a_{k+3} \end{array}\right| $$ must be zero modulo $N$.
As an example let's analyze your first sample sequence. With $k=1$ we get $$ \left|\begin{array}{lll} 1&5&2\\ 1&2&7\\ 1&7&4 \end{array}\right|=-16, $$ so $N$ must be a factor of 16. With $k=2$ we get $$ \left|\begin{array}{lll} 1&2&7\\ 1&7&4\\ 1&4&1 \end{array}\right|=-24, $$ so $N$ must be a factor of 24 as well. Therefore $N \mid 8$, and an inspection of the sequence shows that a proper divisor of 8 is out of the question.
If you can deduce $N$ in this way, then finding the remaining coefficients should be easy using the theory of systems of modular equations.