为什么皮萨诺周期11等于120而不是9

xe55xuns  于 2021-08-20  发布在  Java
关注(0)|答案(1)|浏览(364)

我试图找到m=11的皮萨诺周期,这样,fn mod m在该周期后重复,对于11,我注意到大多数在线论坛提到11的皮萨诺周期是120。这里是查找皮萨诺周期的代码
然而,当试图找到pisano周期11时,我遇到了fn mod m的以下模式:

n=0 , m=11,  fn =   0 , fnmodm   0
n=1 , m=11,  fn =   1 , fnmodm   1
n = 2 , m=11  fn = 1   fnmodm : 1
n = 3 , m=11  fn = 2   fnmodm : 2
n = 4 , m=11  fn = 3   fnmodm : 3
n = 5 , m=11  fn = 5   fnmodm : 5
n = 6 , m=11  fn = 8   fnmodm : 8
n = 7 , m=11  fn = 13   fnmodm : 2
n = 8 , m=11  fn = 21   fnmodm : 10
n = 9 , m=11  fn = 34   fnmodm : 1
n = 10 , m=11  fn = 55   fnmodm : 0
n = 11 , m=11  fn = 89   fnmodm : 1
n = 12 , m=11  fn = 144   fnmodm : 1
n = 13 , m=11  fn = 233   fnmodm : 2
n = 14 , m=11  fn = 377   fnmodm : 3
n = 15 , m=11  fn = 610   fnmodm : 5
n = 16 , m=11  fn = 987   fnmodm : 8
n = 17 , m=11  fn = 1597   fnmodm : 2
n = 18 , m=11  fn = 2584   fnmodm : 10
n = 19 , m=11  fn = 4181   fnmodm : 1
n = 20 , m=11  fn = 6765   fnmodm : 0
n = 21 , m=11  fn = 10946   fnmodm : 1
n = 22 , m=11  fn = 17711   fnmodm : 1
n = 23 , m=11  fn = 28657   fnmodm : 2
n = 24 , m=11  fn = 46368   fnmodm : 3
n = 25 , m=11  fn = 75025   fnmodm : 5
n = 26 , m=11  fn = 121393   fnmodm : 8
n = 27 , m=11  fn = 196418   fnmodm : 2
n = 28 , m=11  fn = 317811   fnmodm : 10
n = 29 , m=11  fn = 514229   fnmodm : 1
n = 30 , m=11  fn = 832040   fnmodm : 0
n = 31 , m=11  fn = 1346269   fnmodm : 1
n = 32 , m=11  fn = 2178309   fnmodm : 1
n = 33 , m=11  fn = 3524578   fnmodm : 2
n = 34 , m=11  fn = 5702887   fnmodm : 3
n = 35 , m=11  fn = 9227465   fnmodm : 5
n = 36 , m=11  fn = 14930352   fnmodm : 8
n = 37 , m=11  fn = 24157817   fnmodm : 2
n = 38 , m=11  fn = 39088169   fnmodm : 10
n = 39 , m=11  fn = 63245986   fnmodm : 1
n = 40 , m=11  fn = 102334155   fnmodm : 0

你会注意到的 fnmodm 每10个值重复一次。因此,这是为什么
谁能帮我看一下,让我知道我在这里遗漏了什么吗?

xzabzqsa

xzabzqsa1#

你得到的模式似乎是正确的。皮萨诺周期11是10。

相关问题