A385459 Consecutive internal states of the linear congruential pseudo-random number generator (3877*s + 29573) mod 139968 when started at 1.
1, 33450, 104855, 85336, 132861, 49430, 53491, 121572, 91961, 63874, 65679, 65264, 135925, 31278, 82091, 9148, 84465, 115226, 122887, 11400, 137453, 76678, 18147, 121556, 29929, 30834, 40319, 2080, 115557, 6494, 12571, 58476, 132833, 80842, 65655, 112184
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(3877*a(n-1)+29573, 139968)) end: seq(a(n), n=1..45); # after Alois P. Heinz
-
Mathematica
NestList[Mod[3877*# + 29573, 139968] &, 1, 50]
Formula
a(n) = (3877*a(n-1) + 29573) mod 139968.
Comments