User:Joffan/sandbox

This is about [primitive roots](https://en.wikipedia.org/wiki/Primitive_root_modulo_n). You need to find a number $a$ such that the powers of $a$ cycle through all the coprime residue classes $\bmod 34$. A good start would be to establish how many such values there are in $[1,33]$ (which is [denoted as $\phi(34)$](https://en.wikipedia.org/wiki/Euler%27s_totient_function)).

The prime factors of $34$ are $2$ and $17$, so basically all numbers not multiples of these two primes are coprime to $34$: all the odd numbers up to $34$ except $17$. All numbers coprime to $34$ are congruent to one of these numbers: $$\{1,3,5,7,9,11,13,15,19,21,23,25,27,29,31,33\}$$

(giving $\phi(34)=16$). So we need to establish which, if any, of these numbers will cycle through congruence to the full set. One useful thing we can be sure of is that raising these numbers to any power (or indeed multiplying some set of them together) will always be congruent to some member of the set, because we are not introducing any multiple of $2$ or $17$ into the product.

[Euler's Theorem](https://en.wikipedia.org/wiki/Euler%27s_theorem) says that, for any $a$ coprime to $n$, $$a^{\phi(n)}=1$$