OFFSET
1,2
COMMENTS
Periodic with period length 500.
Originally defined by Lamie in the form (61*s+2323) mod 500, even though 2323 > 500.
REFERENCES
Edward L. Lamie, Pascal Programming, John Wiley and Sons, 1987 (see p. 150).
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..500
Stephen K. Park and Keith W. Miller, Random number generators: good ones are hard to find, Communications of the ACM, Vol 31, 10 (1988), 192-201.
FORMULA
a(n) = (61*a(n-1) + 323) mod 500.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(61*a(n-1)+323, 500))
end:
seq(a(n), n=1..54); # Alois P. Heinz, May 21 2025
MATHEMATICA
NestList[Mod[61*# + 323, 500] &, 1, 100] (* Paolo Xausa, May 19 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 18 2025
STATUS
approved
