A385340 Consecutive states of the linear congruential pseudo-random number generator (1093*s + 18257) mod 86436 when started at s=1.
1, 19350, 77423, 20752, 53961, 48278, 60151, 71940, 78353, 10, 29187, 24764, 30841, 17430, 53327, 46804, 4917, 33506, 77887, 9288, 57029, 30598, 11139, 5708, 33709, 40458, 70055, 6076, 3753, 57794, 2383, 29796, 85349, 40270, 37443, 59228, 13897, 81378, 21767
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(1093*a(n-1)+18257, 86436)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[1093*# + 18257, 86435] &, 1, 50] (* after Paolo Xausa *)
Formula
a(n) = (1093 * a(n-1) + 18257) mod 86436.
Comments