A384196 Consecutive states of the linear congruential pseudo-random number generator 20403*s mod 2^15 when started at s=1.
1, 20403, 30505, 30891, 9361, 20579, 16953, 25819, 6689, 29715, 1609, 27659, 28849, 27331, 21337, 15931, 14401, 25715, 14697, 2923, 209, 4387, 18553, 923, 23137, 8403, 4233, 22219, 21745, 17283, 8601, 13563, 129, 10547, 2985, 20011, 27921, 483, 24249, 21083
Offset: 1
References
- Fred Maryanski, Digital Computer Simulation, Hayden Book Co., 1980 (see p. 224-230).
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..8192
- Stephen K. Park and Keith W. Miller, Random number generators: good ones are hard to find, Communications of the ACM, Vol 31, 10 (1988), 192-201.
- 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 8192.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(20403*a(n-1), 2^15)) end: seq(a(n), n=1..40); # Alois P. Heinz, May 21 2025
-
Mathematica
NestList[Mod[20403*#, 2^15] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
-
PARI
a(n) = lift(Mod(20403,32768)^(n-1)) \\ Jianing Song, Jul 06 2025
Formula
a(n) = 20403 * a(n-1) mod 2^15.
Comments