It says for part A to Find a primitive root r of 38? Im not sure if I did it right.
I first calculated $\phi(38)=\phi(19*2)=18$. So there are 18 numbers that are relatively prime to 38. Listing them out we get 1,3,5,7,9,11,13,15,17,21,... so on. So I decided to test out 1. But $ord_1 38$ does not equal $\phi(38)$. But $ord_3 38=\phi(38)$.
So I calculated it until i found a power of 3 that was congruent to $1 \pmod {38}$ So I get $$3^1≡ 3 \pmod {38}$$ $$3^2 ≡ 9 \pmod {38}$$ $$3^3 ≡ 27 \pmod {38}$$ $$3^4 ≡ 5 \pmod {38}$$ $$ 3^5 ≡ 15 \pmod {38}$$ $$3^6 ≡ 7\pmod {38}$$ $$3^7 ≡ 21 \pmod {38}$$ $$3^8 ≡ 25 \pmod {38}$$ $$3^9 ≡ -1 \pmod {38}$$ $$3^{16} ≡ 17 \pmod {38}$$ $$3^{17} ≡ 13 \pmod {38}$$ $$3^{18} ≡ 1 \pmod {38}$$ So $ord_3 38=18=\phi(38)$.
\pmod
macro of TeX. Take a peek at the source code now to see how it is used. – Jyrki Lahtonen May 01 '13 at 05:21