%I #18 Nov 13 2024 16:30:51
%S 0,1234567,275232896354,254512755561,100356676888,52443177035,
%T 94402644702,182170448089,160360104896,160787264823,53709154570,
%U 135639047837,234571597824,250315882231,144609285758,175142970105,222009343972,112485333059,70607625066,140050302193
%N Initial terms from the linear congruential pseudorandom number generator defined by the recurrence a(n + 1) = a(n) * 7202161 + 1234567 (modulo 277945762500) with a(0) = 0.
%C Referred to as ba3koxobe-cajedeja for convenience; this name is a simple representation of the modulus and multiplier in base 105.
%C The modulus 277945762500 is the fourth hyperprimorial, 2^2 * 3^3 * 5^5 * 7^7 (A076265).
%C 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.
%C 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.
%C 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.
%C 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.
%C Reasons for the superiority of this modulus and these multipliers are guessed at, but remain to be determined.
%H Alois P. Heinz, <a href="/A144694/b144694.txt">Table of n, a(n) for n = 0..10000</a>
%H George Marsaglia, <a href="http://www.jstatsoft.org/v08/i14">Xorshift RNGs</a>, Journal of Statistical Software, Vol. 8, Issue 14, Jul 2003.
%H Richard Simard, <a href="http://www.iro.umontreal.ca/~simardr/testu01/tu01.html">TestU01: Empirical Testing of Random Number Generators</a>
%H John Walker, <a href="http://www.fourmilab.ch/random/">ENT: A Pseudorandom Number Sequence Test Program</a>
%H <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%F a(n+1) = a(n) * 7202161 + c (modulo 277945762500) where c > 0 and gcd(c,277945762500) = 1, with a(0) a nonnegative integer.
%p a:= proc(n) option remember; `if`(n=0, 0,
%p irem(7202161 *a(n-1) +1234567, 277945762500))
%p end:
%p seq(a(n), n=0..30); # _Alois P. Heinz_, Jun 10 2014
%t NestList[Mod[#*7202161 + 1234567, 277945762500] &, 0, 20] (* _Paolo Xausa_, Nov 13 2024 *)
%Y Cf. A076265, A116935.
%K easy,nonn,less
%O 0,2
%A _Reikku Kulon_, Sep 19 2008