OFFSET
1,2
COMMENTS
Periodic with period 29282.
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) = (419 * a(n-1) + 6173) mod 29282.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(419*a(n-1)+6173, 29282))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[419*# + 6173, 29282] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Jun 16 2025
STATUS
approved
