0%

Problem 854


Problem 854


Pisano Periods 2

For every positive integer n the Fibonacci sequence modulo n is periodic. The period depends on the value of n. This period is called the Pisano period for n, often shortened to π(n).

Define M(p) as the largest integer n such that π(n)=p, and define M(p)=1 if there is no such n.

For example, there are three values of n for which π(n) equals 18: 19,38,76. Therefore M(18)=76.

Let the product function P(n) be:
P(n)=p=1nM(p).
You are given: P(10)=264.

Find P(1 000 000)mod1 234 567 891.


皮萨诺周期(二)

对任意正整数n,斐波那契数列对n取余的结果都是周期数列,其周期取决于n的取值。这一周期被称为n皮萨诺周期,通常记为π(n)

定义M(p)为最大的、满足π(n)=p的整数n。若不存在这样的n,定义M(p)=1

例如,有三个n满足π(n)等于18,分别是193876,因此M(18)=76

记函数P(n)为:
P(n)=p=1nM(p)
已知P(10)=264

P(1 000 000)mod1 234 567 891


Gitalking ...