1

Note: By entering the caption math.SE listed a bunch of posts but none answerd my question. Also Wikipedia was no help for my case, so I dare to ask here.

The LCG $s_{k+1} = a\cdot s_k \pmod m$ in question is $$s_{k+1} = 2851130928467\cdot s_k \pmod {10^{15}}$$ Its period length is $5\cdot 10^{13}$, I was kindly told. This period length (and my limited resources) thwart to prepare a complete list of a sequence. It would take me years before I could test another seed. That is why I have three questions:

a) A period length of $5\cdot 10^{13}$ and $m=10^{15}$ determine gaps in the sequence of results. Since all results are odd only $1$ of $10$ will show up. Are there, depending on the seed, more than one sequences possible? If yes, how many do exist? If less than $10$, are "outsider" seeds attracted by a single or few more iterations to the "principal" sequence/s?

b) How may the $n^{th}$ result be predicted (computed)? I know already the $5\cdot 10^{13}$-th result, it's the seed $s_0$, but how about others? If I look at the $10^8$-th and the $2\cdot 10^8$-th results, at last the $9$ least significant digits are the same as those of the seed (the pattern known when using this kind of LCGs). Thus I surmise there could be a way to calculate any result with no need to compute all the n-1 preceding it.

c) By chance I know a seed $s_0=854559739889001$ which results in $|\Delta{s}|=378$, which is surprising low me think. I found another seed with the same $\Delta{s}$. Is there a chance to compute seeds with even a lower difference of the two following results?

m-stgt
  • 575
  • You predict LCG by finding a and m. See here: https://security.stackexchange.com/questions/4268/cracking-a-linear-congruential-generator Seed is irrelevant, if you are only interested in future values. In fact you won't ever know seed, unless you explicitly know how many times given LCG generated numbers. – freakish Apr 22 '24 at 11:49
  • @freakish -- As shown in OP, $a=2851130928467$ and $m=10^{15}$, while $s_0$ is at will -- almost at least, there is a filter that forces it to be odd. Your link is (as I grasp) about how to find $m$, but it also has a nice finding that is new for me: "The probability that k integers are co-prime is given by 1/ζ(k)". – m-stgt Apr 22 '24 at 13:03

0 Answers0