login
A385461
Consecutive internal states of the linear congruential pseudo-random number generator (8121*s + 28411) mod 134456 when started at 1.
1
1, 36532, 94847, 116930, 88669, 97480, 121019, 84806, 54305, 23636, 107655, 61754, 11765, 108216, 46131, 63846, 59441, 51732, 103439, 109898, 125597, 18432, 65155, 67806, 83617, 79268, 122967, 38706, 1709, 58232, 48731, 68854, 123697, 50972, 116455, 130418
OFFSET
1,2
COMMENTS
Periodic with period 134456.
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) = (8121*a(n-1) + 28411) mod 134456.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(8121*a(n-1)+28411, 134456))
end:
seq(a(n), n=1..45); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[8121*# + 28411, 134456] &, 1, 50]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Jun 29 2025
STATUS
approved