OFFSET
0,2
COMMENTS
Referred to as ba3koxobe-cajedeja for convenience; this name is a simple representation of the modulus and multiplier in base 105.
The modulus 277945762500 is the fourth hyperprimorial, 2^2 * 3^3 * 5^5 * 7^7 (A076265).
The multiplier 7202161 is the semiprime 37 * 194653, located by exhaustive search of the integers allowing 64-bit computation. The maximum possible result of a(n) * 7202161 is 277945762499 * 7202161 = 2001810130785560339, a 61-bit value.
The addend 1234567 (A116935) is the memorable palindromic semiprime 127 * 9721, chosen for that property alone. Its value is not important, except that it must be nonzero and cannot be a multiple of 2, 3, 5, or 7.
Conversion of a(n) to 32 bits produces a sequence that passes the strongest empiric tests of randomness immediately available, including every test in the TestU01 Rabbit battery and every test in the Smallcrush battery except the birthday spacings test. Combining this output by XOR with the output of another generator, such as a Xorshift generator as described by Marsaglia, overcomes the observed flaws and allows the birthday spacings test to be passed as well.
Other multipliers identified for this modulus, believed to be marginally weaker (with minimal testing), in presumed order of decreasing strength, are 13683601, 19701361, 8692321, 11634841, 20627461, 3108421, 10419781, 3999241 and 9505021. All except 8692321 are semiprimes.
Reasons for the superiority of this modulus and these multipliers are guessed at, but remain to be determined.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
George Marsaglia, Xorshift RNGs, Journal of Statistical Software, Vol. 8, Issue 14, Jul 2003.
Richard Simard, TestU01: Empirical Testing of Random Number Generators
John Walker, ENT: A Pseudorandom Number Sequence Test Program
FORMULA
a(n+1) = a(n) * 7202161 + c (modulo 277945762500) where c > 0 and gcd(c,277945762500) = 1, with a(0) a nonnegative integer.
MAPLE
a:= proc(n) option remember; `if`(n=0, 0,
irem(7202161 *a(n-1) +1234567, 277945762500))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Jun 10 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Reikku Kulon, Sep 19 2008
STATUS
approved