OFFSET
1,2
COMMENTS
An example of a terrible random number generator.
Periodic with period 1155 (well below the modulus 2311).
REFERENCES
Modula Corporation, MacModula-2 System Reference Manual, 1985 (see p. 41).
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..1155
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.
FORMULA
a(n) = 13 * a(n-1) mod 2311.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(13*a(n-1), 2311))
end:
seq(a(n), n=1..47); # Alois P. Heinz, May 21 2025
MATHEMATICA
NestList[Mod[13*#, 2311] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
PROG
(PARI) my(f=Mod(13, 2311)); a(n) = lift(f^((n-1) % 1155)); \\ Kevin Ryde, May 25 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 19 2025
STATUS
approved
