<s>[INST] 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
 [/INST] 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$.
</s>