login
A384194
Consecutive states of the linear congruential pseudo-random number generator 259*s mod 2^15 when started at s=1.
5
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,2
COMMENTS
Periodic with period 8192 (considerably less than the modulus).
A 16-bit version of RANDU (A096555) that suffers from all the same problems.
REFERENCES
Byron S. Gottfried, Schaum's Outline of Theory and Problems of Programming with Pascal, McGraw-Hill, 1985 (see p. 143).
LINKS
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.
FORMULA
a(n) = 259 * a(n-1) mod 2^15.
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 *)
CROSSREFS
Sequence in context: A082788 A043376 A038480 * A309763 A344193 A254642
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 21 2025
STATUS
approved