-1

I have a problem with number theory. I want to calculate $7^{242}$ in $\pmod{35}$, and have tried Euler totient function, but not come a long way with that.

Also tried $7^{241} \times 7^{1} = 7 \times 7 = 49$ in $\pmod{241}$. And if the residue is $49$ in $\pmod{241}$, then $7^{242} \pmod{35}$ would be $14$.

Any tips?

Preben

Jyrki Lahtonen
  • 140,891
Preben
  • 1
  • Do you know the Chinese remainder theorem? or have you calculated the first few powers of $7\bmod 35$? – J. W. Tanner May 07 '20 at 21:08
  • $7^{242}\bmod 35 = 7(\color{#c00}{7^{241}} \bmod 5) = 7(\color{#c00}2),,$ by using the mod distributive law to factor out $7,,$ and $\bmod 5!:\ 7^4=1\Rightarrow \color{#c00}{7^{241}}\equiv 7^{241\bmod 4}\equiv 7^1\equiv \color{#c00}2\ \ $ – Bill Dubuque Dec 24 '24 at 21:26

5 Answers5

2

You can use a consequence of Carmichael's generalization of the Euler–Fermat theorem:

If $n$ is square-free, then $a^{\lambda (n)+1} \equiv a \bmod n$ for all integers $a$. [Wikipedia]

Since $35=5 \cdot 7$ is square-free and $\lambda(35)=lcm(\phi(5),\phi(7)=12$, we get $$ 7^{12k+1} \equiv 7 \bmod 35 \implies 7^{242} = 7^{241} 7 \equiv 7^{2} \bmod 35 $$

lhf
  • 221,500
2

hint

$7 $ and $ 35 $ are not relatively prime. You cannot use Euler's Theorem based on the Totient Function. But you can try computing successive powers of $7$.

$$7^2=49 \equiv 14 \mod 35$$

$$7^3\equiv 98 \equiv 28 \equiv -7$$

$$7^4 \equiv -14$$ $$7^5 \equiv 7$$

$$7^6 \equiv 14 ...$$

1

$7^{242} \equiv (35+14)^{121} \equiv 14(15-1)^{120} \equiv 14 \pmod{35}$ & we are done.

0

$7^{242}\equiv0\bmod7$ and $7^{242}\equiv2^{242}\equiv2^2=4\bmod 5$.

Now can you figure out $7^{242} \bmod35$?

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
-1

Write 242 in base 2, $i.e.$ $$242=a_02^0+a_12^1+a_22^2+a_32^3+...$$ where $a_i=$ 0 or 1. Then simultaneosly calculate, modulo 35, $$(\text{i}) \qquad7^{2^0},7^{2^1},7^{2^2},7^{2^3},...$$ $[N.B.$ The first number is 7, each subsequent number is the square of the preceding, modulo 35] and $$(\text{ii})answer=1 \times x_0 \times x_1\times x_2\times x_3 \times ...$$ modulo 35 where $$x_i=1 \text { if } a_i=0,x_i=7^{2^i} \text { if } a_i=1$$

P. Lawrence
  • 5,768