Simple linear congruential sequence generator in Java