Intereting Posts

To evaluate limit of sequence $\left(\left( 1 + \frac1n \right) \left( 1 + \frac2n \right)\cdots\left( 1 + \frac nn \right) \right)^{1/n}$
Newton optimization algorithm with non-positive definite Hessian
Is the order of universal/existential quantifiers important?
How are infinite-dimensional manifolds most commonly treated?
Introductory text on nets
If $p$ and $q$ are distinct primes and $a$ be any integer then $a^{pq} -a^q -a^p +a$ is divisible by $pq$.
Intuitive explanation of variance and moment in Probability
$x+y\sqrt{2}$ infimum ($x,y\in \mathbb{Z}$)
Choosing half of prefix and suffix
estimate population percentage within an interval, given a small sample
Stampacchia Theorem: $\nabla G(u)=G'(u)\nabla u$?
Convolution of continuous and discrete distributions
Find possible number of triangles with integer sides for a given inradius
Find short and simple methods to solve $24x^4+1=y^2$
For $N\unlhd G$ , with $C_G(N)\subset N$ we have $G/N$ is abelian

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?

- Do there exist Artificial Squares?
- Given integers $a \ge b > 0$ and a prime number $p$, prove that ${pa \choose pb} \equiv {a \choose b} \mod p$.
- Find the last two digits of $3^{45}$
- Getting an X for Chinese Remainder Theorem (CRT)
- Modular Arithmetic - Find the Square Root
- Good description of orbits of upper half plane under $SL_2 (Z)$

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?

- A puzzle with powers and tetration mod n
- Book/Books leading up to the the axiom of choice?
- Calculate the multiplicative inverse modulo a composite number
- Strategy to improve own knowledge in certain topics?
- Branch points of global analytic functions (Ahlfors)
- Rigorous Text in Multivariable Calculus and Linear Algebra
- Show that $L^1$ is strictly contained in $(L^\infty)^*$
- A linear operator commuting with all such operators is a scalar multiple of the identity.
- Unique pair of positive integers $(p,n)$ satisfying $p^3-p=n^7-n^3$ where $p$ is prime
- Find a conformal map from the disc to the first quadrant.

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.

Not every finite sequence can be obtained by a linear congruence generator. In fact, the one you request cannot.

Note that we must have $m\geq 23$ in order to “get” $22$ as an answer. We have that you are requiring:

$$\begin{align*}

2a + c &\equiv 11 \pmod{m}\\

11a+c &\equiv 5\pmod{m}\\

5a+c &\equiv 9\pmod{m}\\

9a+c &\equiv 6\pmod{m}\\

6a+c&\equiv 22\pmod{m}.

\end{align*}$$

Subtracting the first congruence from the second, we get $9a \equiv -6\pmod{m}$; subtracting this from the fourth congruence, we obtain $c\equiv 12\pmod{m}$. So now we know the value of $c$, which gives

$$\begin{align*}

2a &\equiv -1\pmod{m}\\

11a &\equiv -7\pmod{m}\\

5a &\equiv -3\pmod{m}\\

9a &\equiv -6\pmod{m}\\

6a &\equiv 10\pmod{m}.

\end{align*}$$

Multiply the first congruence by $3$ to get $6a\equiv -3\pmod{m}$. Since we also need $6a\equiv 10\pmod{m}$, we must have $10\equiv -3\pmod{m}$, or $13\equiv 0\pmod{m}$. But that means that $m=1$ or $m=13$, which contradicts our requirement that $m\geq 23$.

There are other contradictions in this system: multiply the third congruence by $2$ to get $10a\equiv -6\pmod{m}$, and subtracting from the second congruence we get $a\equiv 3\pmod{m}$. But subtracting $9a\equiv -6\pmod{m}$ from $10a\equiv -6\pmod{m}$ would give $a\equiv 0\pmod{m}$, so we would need $3\equiv 0\pmod{m}$, again a problem.

Or note that $2a\equiv -1\pmod{m}$ tells you that $\gcd(2,m)=1$, so that $6a\equiv 10\pmod{m}$ is equivalent to $3a\equiv 5\pmod{m}$, and multiplying by $3$ gives $9a\equiv 15\pmod{m}$; comparing with $9a\equiv -6\pmod{m}$ gives $21\equiv 0\pmod{m}$, so $m$ would have to divide $21$. Etc.

- How many nodes do you need?
- Eigenfunctions of the Laplacian
- Solving a second-order linear ODE: $\frac{d^2 y}{dx^2}+(x+1)\cdot \frac{dy}{dx}+5x^2\cdot y=0$
- Fermats Little Theorem
- Prove that $H$ is normal.
- Every closed convex cone in $ \mathbb{R}^2 $ is polyhedral
- field generated by a set
- Show that $\int_0^\infty \frac{x\log(1+x^2)}{e^{2\pi x}+1}dx=\frac{19}{24} – \frac{23}{24}\log 2 – \frac12\log A$
- How to figure out if $x,y,z$ are postive reals and $x(1+y)+y(1+z)+z(1+x)=6\sqrt{xyz}$ then $xyz=1$
- Do the real numbers and the complex numbers have the same cardinality?
- If a Subset Admits a Smooth Structure Which Makes it into a Submanifold, Then it is a Unique One.
- Isotropic Manifolds
- Understanding direct sum of matrices
- Egyptian fraction representations of real numbers
- Probability that A meets B in a specific time frame