A385339 Consecutive states of the linear congruential pseudo-random number generator (1255*s + 6173) mod 29282 when started at s=1.
1, 7428, 16637, 7542, 13297, 3168, 28943, 19958, 17353, 27662, 22813, 27974, 4425, 25250, 11799, 26508, 9361, 12146, 22763, 23788, 21755, 17874, 8031, 12070, 15229, 26704, 21085, 26202, 5997, 6934, 11589, 26496, 23583, 28018, 1081, 15856, 22975, 26310, 24409
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(1255*a(n-1)+6173, 29282)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[1255*# + 6173, 29282] &, 1, 50] (* after Paolo Xausa *)
Formula
a(n) = (1255 * a(n-1) + 6173) mod 29282.
Comments