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).
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.
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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Jun 17 2025
STATUS
approved
