login
A385078
Consecutive states of the linear congruential pseudo-random number generator (967*s + 3041) mod 14406 when started at s=1.
5
1, 4008, 3563, 5428, 8133, 1976, 12241, 12762, 12359, 11620, 2901, 13544, 5035, 2658, 9059, 4246, 3213, 12722, 2491, 6036, 5423, 3298, 8481, 7154, 6079, 3786, 4979, 6130, 9885, 10658, 9037, 11784, 3023, 1864, 4779, 8, 10777, 8862, 1025, 202, 11097, 1370, 2479
OFFSET
1,2
COMMENTS
Periodic with period 14406.
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) = (967 * a(n-1) + 3041) mod 14406.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(967*a(n-1)+3041, 14406))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[967*# + 3041, 14406] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
CROSSREFS
KEYWORD
nonn,look,easy
AUTHOR
Sean A. Irvine, Jun 16 2025
STATUS
approved