Problem 56225. Easy Sequences 76: Not so easy as Pisano Pi
Pisano period , of an integer n, is the period in which the sequence of Fibonacci numbers modulo n repeats. For example it is not hard to show that , and are 3, 8 and 6, respectively:
This problem is a bit different from the previous Problem 56220. Easy Sequences 75: Easy as Pisano Pi.
In this problem, aside from n, we are given the exponent e and modular base m, and we are asked to calculate:
>> mod(pisanoPi(n^e),m).
Solution Stats
Problem Comments
-
1 Comment
GeeTwo
on 17 Dec 2022
Missing from problem description:
1) Forbidden: global, persistent, java, BigInteger .
2) Note that e and m are sometimes missing and sometimes scalar when n is a row vector. When both are missing, behavior should be like Easy Sequences 75. When e is given and m is missing, should be like es75(e^m) were e^m presentable as a double.
When n is a vector and e or m are scalar, use as if e and m were vectors with same size() as n.
Solution Comments
Show commentsProblem Recent Solvers2
Suggested Problems
-
101819 Solvers
-
Multiples of a Number in a Given Range
690 Solvers
-
Pandigital number n°3 (Inspired by Project Euler 32)
36 Solvers
-
896 Solvers
-
Determine whether a number is a fibodiv number
16 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!