A385036 Consecutive states of the linear congruential pseudo-random number generator (419*s + 6173) mod 29282 when started at s=1.
1, 6592, 15713, 1470, 7181, 28248, 12157, 4888, 4505, 19720, 11329, 9340, 25127, 22148, 3791, 13374, 17017, 20770, 12049, 18200, 18653, 3486, 2707, 27690, 12611, 19422, 3595, 19096, 13411, 3238, 15923, 1614, 8953, 9384, 14281, 16384, 19081, 7126, 5203, 19362
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
- Sean A. Irvine, Table of n, a(n) for n = 1..10000
- W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
- Index entries for sequences related to pseudo-random numbers.
- Index entries for linear recurrences with constant coefficients, order 29282.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(419*a(n-1)+6173, 29282)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[419*# + 6173, 29282] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
Formula
a(n) = (419 * a(n-1) + 6173) mod 29282.
Comments