login
A384152
Consecutive states of the linear congruential pseudo-random number generator used by OMNITAB II when started at 1.
5
1, 125, 7433, 3429, 2641, 2445, 2521, 3829, 3489, 1949, 6057, 3461, 6641, 2733, 5753, 6421, 8001, 701, 5705, 421, 3473, 8141, 1817, 5941, 5345, 4573, 6377, 2501, 1329, 2285, 7097, 2389, 3713, 5373, 8073, 1509, 209, 1549, 5209, 3957, 3105, 3101, 2601, 5637, 113
OFFSET
1,2
COMMENTS
Periodic with period length 2048.
A terrible generator with period much less than the modulus.
Also, RN5 of the IRCCRAND package.
Originally defined by Kruskal including the implementation s = 5*s mod 8192; s = 5*s mod 8192; s = 5*s mod 8192 (rather than s = 125*s mod 8192).
LINKS
David Hogben, Sally T. Peavy, and Ruth N. Varner, OMNITAB II: User's Reference Manual, NBS Technical Note 552, 1971.
J. B. Kruskal, Extremely portable random number generator, Communications of the ACM, 12, 2 (1969), 93-94.
W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
FORMULA
a(n) = 125 * a(n-1) mod 2^13.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(125*a(n-1), 2^13))
end:
seq(a(n), n=1..45); # Alois P. Heinz, May 21 2025
MATHEMATICA
NestList[Mod[125*#, 2^13] &, 1, 100] (* Paolo Xausa, May 21 2025 *)
PROG
(PARI) a(n) = lift(Mod(5, 8192)^(3*n-3)) \\ Jianing Song, Jul 06 2025
CROSSREFS
Cf. A096550-A096561 (other pseudo-random number generators).
Cf. A383809, A384113, A384126, A384971, A384973 (other examples with short periods).
Sequence in context: A017583 A046232 A102076 * A223229 A030695 A317981
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 20 2025
STATUS
approved