A385279 Consecutive states of the linear congruential pseudo-random number generator (625*s + 6571) mod 31104 when started at s=1.
1, 7196, 25095, 14530, 5453, 24360, 21715, 17102, 26649, 21556, 11039, 858, 14053, 18368, 9195, 30310, 7985, 20556, 8119, 10994, 3837, 9688, 27395, 21246, 3913, 26084, 10575, 21898, 7061, 2928, 1435, 1430, 29409, 4732, 9191, 27810, 685, 30344, 29235, 20398
Offset: 1
References
- William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical Recipes in C (2nd ed), Cambridge University Press, 1999 (see p. 285).
Links
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(625*a(n-1)+6571, 31104)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[625*# + 6571, 31104] &, 1, 50] (* after Paolo Xausa *)
Formula
a(n) = (625 * a(n-1) + 6571) mod 31104.
Comments