A384082 Consecutive states of the linear congruential pseudo-random number generator (61*s+323) mod 500 when started at s=1.
1, 384, 247, 390, 113, 216, 499, 262, 305, 428, 431, 114, 277, 220, 243, 146, 229, 292, 135, 58, 361, 344, 307, 50, 373, 76, 459, 322, 465, 188, 291, 74, 337, 380, 3, 6, 189, 352, 295, 318, 221, 304, 367, 210, 133, 436, 419, 382, 125, 448, 151, 34, 397, 40
Offset: 1
References
- Edward L. Lamie, Pascal Programming, John Wiley and Sons, 1987 (see p. 150).
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..500
- Stephen K. Park and Keith W. Miller, Random number generators: good ones are hard to find, Communications of the ACM, Vol 31, 10 (1988), 192-201.
- Index entries for sequences related to pseudo-random numbers.
- Index entries for linear recurrences with constant coefficients, order 500.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(61*a(n-1)+323, 500)) end: seq(a(n), n=1..54); # Alois P. Heinz, May 21 2025
-
Mathematica
NestList[Mod[61*# + 323, 500] &, 1, 100] (* Paolo Xausa, May 19 2025 *)
Formula
a(n) = (61*a(n-1) + 323) mod 500.
Comments