A384194 Consecutive states of the linear congruential pseudo-random number generator 259*s mod 2^15 when started at s=1.
1, 259, 1545, 6939, 27729, 5619, 13529, 30603, 29089, 30179, 17577, 30459, 24561, 4307, 1401, 2411, 1857, 22211, 18249, 7899, 14225, 14259, 23065, 10059, 16609, 9123, 3561, 4795, 29489, 2707, 12985, 20779, 7809, 23683, 6281, 21147, 4817, 2419, 3929, 1803, 8225
Offset: 1
References
- Byron S. Gottfried, Schaum's Outline of Theory and Problems of Programming with Pascal, McGraw-Hill, 1985 (see p. 143).
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.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(259*a(n-1), 2^15)) end: seq(a(n), n=1..41); # Alois P. Heinz, May 21 2025
-
Mathematica
NestList[Mod[259*#, 2^15] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
Formula
a(n) = 259 * a(n-1) mod 2^15.
Comments