function [Y] = UniGen(j0, betta, ValueCount)
global Y endJ

    LastJ = j0;
    a = 630360016;
    m = 2147483647;

    for i=1:ValueCount
        J=mod((a*LastJ), m);
        LastJ=J;
        Y(i) = - betta*log(J/m);
    end;
    endJ = J;
