OFFSET
1,2
COMMENTS
Periodic with period 2^22-1.
This generator was recommended by Sharp and Bays for 24-bit floating-point.
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..10000
W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
FORMULA
a(n) = 3373 * a(n-1) mod (2^24-3).
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(3373*a(n-1), 2^24-3))
end:
seq(a(n), n=1..28); # Alois P. Heinz, May 23 2025
MATHEMATICA
NestList[Mod[3373*#, 2^24 - 3] &, 1, 50] (* Paolo Xausa, May 26 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 23 2025
STATUS
approved
