A385078 Consecutive states of the linear congruential pseudo-random number generator (967*s + 3041) mod 14406 when started at s=1.
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
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).
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..14406
- W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
- Index entries for sequences related to pseudo-random numbers.
- Index entries for linear recurrences with constant coefficients, order 14406.
Programs
-
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 *)
Formula
a(n) = (967 * a(n-1) + 3041) mod 14406.
Comments