SEQ - matrix exponentiation maths help

My solution is failing at last test case , any hint it is so.