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