<s>[INST] Finding the remainder. Let $a,b$ be positive integers such that $7$ divide $a^2+b^2$ .How to find the remainder when we divide $ab-1$ by $7$
 [/INST] Answer is 6
a^2+b^2+2=(a+b)^2-2ab+2
2(ab-1)=(a+b)^2-(a^2+b^2)-2
        =49d+7k-2
ab-1=7[k+7d]/2-1=7[k+7d]/2-7+6
Note that both a,b are divisible by 7
Assume if not a=7n+1,7n+2,7n+3,b=7m+1,7m+2,7m+3,etc. and check
</s>