Find all pairs $(a, b)$ of coprime positive integers, such that $a<b$ and $$b \mid (n+2)a^{n+1002}-(n+1)a^{n+1001}-na^{n+1000}$$for all positive integers $n$.
Source: Bulgarian Autumn Tournament 2023, 8.3
Tags: number theory
Find all pairs $(a, b)$ of coprime positive integers, such that $a<b$ and $$b \mid (n+2)a^{n+1002}-(n+1)a^{n+1001}-na^{n+1000}$$for all positive integers $n$.