When is $\frac{x^2+xy+y^2}{49}$ an integer? 
Find the number of distinct ordered pairs $(x, y)$ of positive integers such that $ 1\leq x, y \leq 49$ and $\frac{x^2+xy+y^2}{49}$ is an integer.

Multiplying the given equation by $(x-y)$ gives $x^3 \equiv y^3 \pmod{49}$. Thus we can't have $7 \mid x$ while $7 \nmid y$ or vice-versa. Rearranging the given equation gives $$(x+y)^2 \equiv xy \pmod{49}.$$ 
If $7 \mid x,y$ then there are $49$ solutions. Now suppose that $7 \nmid x,y$. Then we have $$(x+y)^2(xy)^{-1} \equiv xy^{-1}+2+xy^{-1} \equiv 1 \pmod{49}.$$ Thus, $xy^{-1}+yx^{-1} \equiv xy^{-1}(1+(yx^{-1})^2) \equiv -1 \pmod{49}$.
I didn't see how to continue from here. The answer is $$2\varphi(49)+49,$$ and $\varphi(49)$ is the number of units modulo $49$, so maybe we can use that to solve this question.

For any given $y$ (not dividing $7$), the congruence $x^3\equiv y^3\pmod{49}$ will have $3$ solutions:
$$x_1=y,\quad x_2=y^{\frac{42+3}3},\quad x_3=y^{\frac{2\cdot42+3}3}\,.$$
(We have $\varphi(49)=42$ possibilities for $y$.) 
Since you multiplied by $x-y$, we will have to drop $x_1$ for every $y$, and thus we arrive to $2\cdot 42$ ordered pairs.
