Find all integers $0\leq x<19$ such that $x^{19}+x^{38}\equiv 2\pmod{19}$

Find all integers $0\leq x<19$ such that $$x^{19}+x^{38}\equiv 2\pmod{19}$$

I think I'm supposed to use Fermat's Little Theorem here and I'm aware that this says that if $p$ is a prime and $a$ is an integer not divisible by $p$ then $a^{p-1}\equiv 1\pmod{p}.$ However, I'm not sure how to directly apply this here where we have a sum on the LHS.

What do I need to do?

• What does Little Fermat tell you about $a^p \pmod p$? – lulu May 29 '16 at 15:48
• You can still treat elements of the sum under $\bmod 19$ rules, so with FLT $x^{19} \equiv x^1$ and $x^{38} \equiv x^{20} \equiv x^2$ – Joffan May 29 '16 at 16:01

Note $x^{18} \equiv 1 \pmod {19}$, and we can conclude
$$x^{19}-x \equiv x(x^{18}-1) \equiv 0 \pmod {19}$$ Via Fermat's Little Theorem.
Thus $$x^{19}+x^{38}-2 \equiv x^2+x-2 \equiv (x+2)(x-1) \equiv 0\pmod{19}$$
• $x^{18}\equiv 1\pmod{19}$ is true if and only if $x\not\equiv 0\pmod{19}$. Either this statement or simply $x^{19}\equiv x\pmod{19}$ for any $x\in\mathbb Z$ could be considered Fermat's Little Theorem depending on who you ask. – user236182 May 29 '16 at 17:38