OFFSET
1,2
COMMENTS
The period length of 2^30 is only achieved if the starting value a(1) is odd. Even starting values lead to shorter periods, i.e., a starting value that is a multiple of 2^k leads to a sequence with period length 2^(30-k). - Hugo Pfoertner, Nov 21 2024
REFERENCES
D. E. Knuth, The Art of Computer Programming Third Edition. Vol. 2 Seminumerical Algorithms. Chapter 3.3.4 The Spectral Test, Page 108. Addison-Wesley 1997.
G. Marsaglia, The structure of linear congruential sequences, in Applications of Number Theory to Numerical Analysis, (edited by S. K. Zaremba), Academic Press, New York, 249-286, 1972.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
George S. Fishman, Multiplicative Congruential Random Number Generators with Modulus 2^beta: An Exhaustive Analysis for beta = 32 and a Partial Analysis for beta = 48, Math. Comp., 54, 189 (1990), 331-344.
FORMULA
a(1)=1, a(n) = 69069 * a(n-1) mod 2^32. The sequence is periodic with period length 2^30. - corrected by Hugo Pfoertner, Aug 10 2011
a(n) == 1 (mod 4). Hugo Pfoertner, Nov 21 2024
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(69069 *a(n-1), 4294967296))
end:
seq(a(n), n=1..30); # Alois P. Heinz, Jun 10 2014
MATHEMATICA
NestList[Mod[#*69069, 2^32] &, 1, 50] (* Paolo Xausa, Aug 29 2024 *)
PROG
(PARI) a(n)=lift(Mod(69069, 2^32)^(n-1)) \\ Charles R Greathouse IV, Jan 14 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hugo Pfoertner, Jul 18 2004
STATUS
approved
