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
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.
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
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 21 2025
STATUS
approved
