• + 0 comments

    the pseudo code is wrong:

    a[0] = S (modulo 2^31) for i = 1 to N-1 a[i] = a[i-1]*P+Q (modulo 2^31)

    The loop must be in C++: for (i = 1; i <= N; ++i)