OFFSET
1,2
COMMENTS
Periodic with period 14406.
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..14406
W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
FORMULA
a(n) = (967 * a(n-1) + 3041) mod 14406.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(967*a(n-1)+3041, 14406))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[967*# + 3041, 14406] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
CROSSREFS
KEYWORD
AUTHOR
Sean A. Irvine, Jun 16 2025
STATUS
approved
