login
A385036
Consecutive states of the linear congruential pseudo-random number generator (419*s + 6173) mod 29282 when started at s=1.
5
1, 6592, 15713, 1470, 7181, 28248, 12157, 4888, 4505, 19720, 11329, 9340, 25127, 22148, 3791, 13374, 17017, 20770, 12049, 18200, 18653, 3486, 2707, 27690, 12611, 19422, 3595, 19096, 13411, 3238, 15923, 1614, 8953, 9384, 14281, 16384, 19081, 7126, 5203, 19362
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).
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