login
A383127
Consecutive internal states of the linear congruential pseudo-random number generator (205*s + 29573) mod 139968 when started at 1.
10
1, 29778, 115439, 39976, 106509, 28910, 77467, 93924, 108377, 131914, 58119, 46688, 82789, 65190, 96563, 89500, 41265, 90818, 31519, 52440, 2237, 68254, 24843, 83540, 79177, 24570, 27575, 83728, 117717, 87062, 101347, 90444, 94817, 11506, 8847, 23624, 113581
OFFSET
1,2
COMMENTS
Periodic with period 139968.
Described in Numerical Recipes as a "quick and dirty" generator.
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).
FORMULA
a(n) = (205*a(n-1) + 29573) mod 139968.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(205*a(n-1)+29573, 139968))
end:
seq(a(n), n=1..45); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[205*# + 29573, 139968] &, 1, 50] (* Paolo Xausa, Jun 18 2025 *)
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Jun 17 2025
STATUS
approved