An approach to nonlinear congruential methods of generating uniform pseudorandom numbers in the interval [0,1) is the Inversive congruential generator with prime modulus. A generalization for arbitrary composite moduli m = p 1 , … p r {\displaystyle m=p_{1},\dots p_{r}} with arbitrary distinct primes p 1 , … , p r ≥ 5 {\displaystyle p_{1},\dots ,p_{r}\geq 5} will be present here.
Let Z m = { 0 , 1 , . . . , m − 1 } {\displaystyle \mathbb {Z} _{m}=\{0,1,...,m-1\}} . For integers a , b ∈ Z m {\displaystyle a,b\in \mathbb {Z} _{m}} with gcd (a,m) = 1 a generalized inversive congruential sequence ( y n ) n ⩾ 0 {\displaystyle (y_{n})_{n\geqslant 0}} of elements of Z m {\displaystyle \mathbb {Z} _{m}} is defined by
where φ ( m ) = ( p 1 − 1 ) … ( p r − 1 ) {\displaystyle \varphi (m)=(p_{1}-1)\dots (p_{r}-1)} denotes the number of positive integers less than m which are relatively prime to m.