Yarra Gnisrever
Problem 680
Let and be two positive integers.
is the -th Fibonacci number: , for all .
Let and let .
Let and let .
Start with an array of integers where initially every is equal to .Now perform successive operations on , where the -th operation consists of reversing the order of those elements in with indices between and (both ends inclusive).
Define to be after operations.
For example, , as can be seen from the following procedure:
Initial position:
Step 1 - Reverse to :
Step 2 - Reverse to :
Step 3 - Reverse to :
Step 4 - Reverse to :
Step 1 - Reverse to :
Step 2 - Reverse to :
Step 3 - Reverse to :
Step 4 - Reverse to :
Also, and .
Find giving your answer modulo .