login
A385338
Consecutive states of the linear congruential pseudo-random number generator (421*s + 17117) mod 81000 when started at s=1.
2
1, 17538, 29615, 11032, 44589, 78086, 5323, 71100, 61217, 31474, 64671, 27608, 57085, 73902, 25859, 49756, 66393, 23570, 58087, 9744, 69341, 49678, 33555, 49772, 73129, 24426, 13463, 15040, 30957, 9014, 5011, 20748, 4025, 10642, 42399, 47096, 80533, 63510
OFFSET
1,2
COMMENTS
Periodic with period 81000.
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) = (421 * a(n-1) + 17117) mod 81000.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(421*a(n-1)+17117, 81000))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[421*# + 17117, 81000] &, 1, 50] (* after Paolo Xausa *)
CROSSREFS
Sequence in context: A321640 A083599 A049521 * A203963 A253403 A213107
KEYWORD
nonn,look,easy
AUTHOR
Sean A. Irvine, Jun 25 2025
STATUS
approved