A385335 Consecutive states of the linear congruential pseudo-random number generator (1741*s + 2731) mod 12960 when started at s=1.
1, 4472, 12483, 1714, 6005, 11676, 9367, 6998, 3849, 3520, 971, 8442, 3613, 7364, 6015, 3166, 6737, 3048, 8659, 5570, 6021, 652, 10343, 8454, 11545, 1616, 3867, 8938, 11789, 11700, 12271, 8462, 12513, 2104, 11075, 12786, 10837, 188, 6039, 6070, 8201, 11712
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(1741*a(n-1)+2731, 12960)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[1741*# + 2731, 12960] &, 1, 50] (* after Paolo Xausa *)
Formula
a(n) = (1741 * a(n-1) + 2731) mod 12960.
Comments