First: By entering the caption math.SE listed a bunch of posts but none answerd my question. So I dare to ask:
Taking a closer look to the ancient HP-21S pocket calculator reveals the nature of its RAN# function. It's a multiplicative congruential generator, computing $s_{k+1} = a\cdot s_k \pmod m$ with $a=2851130928467$ (a prime) and $m=10^{15}$ (it's a BCD machine).
Question: What is the period length of $$s_{k+1} = 2851130928467\cdot s_k \pmod {10^{15}}$$
What I found so far:
- According to Wikipedia this algorithm returns a Weyl sequence, thus it is not a full period LCG.
- Obviously all returned $s_n$ are odd (at least those of ~10 test runs).
- Maybe the period could be calculated with a Carmichael function, but even with the shown numerical examples I am not able to repeat it with the a. m. numbers.
- I try to get it by brute force, but the "force" of my PC did not finish it within one day.
A simple answer like period is -- for sure, no doubt -- $m/4$ would do. TY in advance.
Trivia: User input for seed is forced to be odd, last digit is set to 1. A seed $s_k=0$ is replaced by $999500333083533$. Output RN for the user are only the 12 most significant digits of $s_{k+1}$, normalized to the range $[0..1[$
(I took the a. m. "closer look to the ancient HP-21S" with an emulator running the original calculator firmware.)