Deterministic random number generator