OFFSET
1,2
COMMENTS
Periodic with period 175000.
Described in Numerical Recipes as a "quick and dirty" generator.
LINKS
FORMULA
a(n) = (2661 * a(n-1) + 36979) mod 175000.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(2661*a(n-1)+36979, 175000))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[2661*# + 36979, 175000] &, 1, 50] (* after Paolo Xausa *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Jun 26 2025
STATUS
approved