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
Sean A. Irvine, Table of n, a(n) for n = 1..2048
Edward J. Dudewicz, IRCCRAND - The Ohio State University Random Number Generator Package, Technical Report, 1974.
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
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 20 2025
STATUS
approved
