What are the members of the set $A=7^{n}+5^{n}(mod35)$ I have this set
$A=${$\ x \ \in \mathbb{N}|\ \exists \ n \ \in \mathbb{N}:$
$x \equiv 7^{n}+5^{n}$ (mod $35$) $ $, $ 35\gt x\ge 0$}
I want to know how many members has this set?
thanks in advance
 A: Observe that if $7^n+5^n \equiv a \pmod{35}$, then $7^n+5^n \equiv a \pmod{7}$ and $7^n+5^n \equiv a \pmod{5}$. The latter congruences can be further reduced to $5^n \equiv a \pmod{7}$ and $7^n \equiv a \pmod{5}$. Now try to see patterns for these and any solution which satisfies both these congruences will also satisfy your original congruence.
A: The period of $7^n\pmod{35}$ will be same as $7^{n-1}\pmod5$ 
But $7\equiv2\pmod5,7^2\equiv4,7^3\equiv3,7^4\equiv1\implies$ord$_57=4$
Similarly, ord$_75=6$
So, the ord$_{35}(5^n+7^n)$ must divide lcm$(4,6)=12$
A: By Little Fermat's Theorem, $7^4\equiv 1\pmod5$ and $5^6\equiv1\pmod7$. In fact, $4$ is the order of $7$ modulo $5$ and $6$ is the order of $5$ modulo $7$. For any integer $k$ the number $12k$ is a multiple of $4$ and $6$. Therefore,
$$5^{n+12k}+7^{n+12k}=5^n\cdot(1+7r)+7^n\cdot(1+5r)\equiv 5^n+7^n\pmod{35}$$
We see that we get the same value for $x$ if we add $12$ (or a multiple of $12$) to both exponents. That is, $A$ has at most $12$ elements. But it is possible that the period is smaller. If it were the case, the period must be a divisor of $12$. But
$$5^0+7^0=2$$
$$5^6+7^6\equiv15+14\not\equiv2\pmod{35}$$
$$5^4+7^4\equiv-5+21\not\equiv2\pmod{35}$$
so the period (and, hence, the number of elements in $A$) is exactly $12$.
