login
A383128
Consecutive internal states of the linear congruential pseudo-random number generator (321*s + 123) mod 10^5 when started at 1.
2
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,2
COMMENTS
Periodic with period 10^5.
LINKS
W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
FORMULA
a(n) = (321*a(n-1) + 123) mod 10^5.
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 *)
CROSSREFS
KEYWORD
nonn,look,easy
AUTHOR
Sean A. Irvine, Jun 17 2025
STATUS
approved