A383128 Consecutive internal states of the linear congruential pseudo-random number generator (321*s + 123) mod 10^5 when started at 1.
1, 444, 42647, 89810, 29133, 51816, 33059, 12062, 72025, 20148, 67631, 9674, 5477, 58240, 95163, 47446, 30289, 22892, 48455, 54178, 91261, 94904, 64307, 42670, 97193, 99076, 3519, 29722, 40885, 24208, 70891, 56134, 19137, 43100, 35223, 6706, 52749, 32552
Offset: 1
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.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(321*a(n-1)+123, 100000)) end: seq(a(n), n=1..45); # after Alois P. Heinz
-
Mathematica
NestList[Mod[321*# + 123, 10^5] &, 1, 50] (* Paolo Xausa, Jun 18 2025 *)
Formula
a(n) = (321*a(n-1) + 123) mod 10^5.
Comments