How to calculate mod of number with big exponent
$begingroup$
I want to find
$$
5^{133} mod 8.
$$
I have noticed that $5^n mod 8 = 5$ when $n$ is uneven and 1 otherwise, which would lead me to say that $5^{133} mod 8 = 5$ But I don't know how to prove this. How can I prove that this is the case (or find another solution if it is not)?
algebra-precalculus arithmetic
$endgroup$
add a comment |
$begingroup$
I want to find
$$
5^{133} mod 8.
$$
I have noticed that $5^n mod 8 = 5$ when $n$ is uneven and 1 otherwise, which would lead me to say that $5^{133} mod 8 = 5$ But I don't know how to prove this. How can I prove that this is the case (or find another solution if it is not)?
algebra-precalculus arithmetic
$endgroup$
1
$begingroup$
Hint: $bmod 8!: color{#c00}{5^{large 2}equiv 1},Rightarrow, 5^{large 2n}equiv (color{#c00}{5^{large 2}})^{large n}equiv color{#c00}1^{large n}equiv 1 $
$endgroup$
– Bill Dubuque
2 hours ago
$begingroup$
What does the triple equal sign mean?
$endgroup$
– Sandi
2 hours ago
$begingroup$
25 leaves a remainder of 1 when divided by 8 so it means they are "equivalent" under mod 8
$endgroup$
– Eleven-Eleven
2 hours ago
$begingroup$
@Sandi this is the common way to write congruences.
$endgroup$
– Mark
2 hours ago
add a comment |
$begingroup$
I want to find
$$
5^{133} mod 8.
$$
I have noticed that $5^n mod 8 = 5$ when $n$ is uneven and 1 otherwise, which would lead me to say that $5^{133} mod 8 = 5$ But I don't know how to prove this. How can I prove that this is the case (or find another solution if it is not)?
algebra-precalculus arithmetic
$endgroup$
I want to find
$$
5^{133} mod 8.
$$
I have noticed that $5^n mod 8 = 5$ when $n$ is uneven and 1 otherwise, which would lead me to say that $5^{133} mod 8 = 5$ But I don't know how to prove this. How can I prove that this is the case (or find another solution if it is not)?
algebra-precalculus arithmetic
algebra-precalculus arithmetic
edited 2 hours ago
Sandi
asked 2 hours ago
SandiSandi
262112
262112
1
$begingroup$
Hint: $bmod 8!: color{#c00}{5^{large 2}equiv 1},Rightarrow, 5^{large 2n}equiv (color{#c00}{5^{large 2}})^{large n}equiv color{#c00}1^{large n}equiv 1 $
$endgroup$
– Bill Dubuque
2 hours ago
$begingroup$
What does the triple equal sign mean?
$endgroup$
– Sandi
2 hours ago
$begingroup$
25 leaves a remainder of 1 when divided by 8 so it means they are "equivalent" under mod 8
$endgroup$
– Eleven-Eleven
2 hours ago
$begingroup$
@Sandi this is the common way to write congruences.
$endgroup$
– Mark
2 hours ago
add a comment |
1
$begingroup$
Hint: $bmod 8!: color{#c00}{5^{large 2}equiv 1},Rightarrow, 5^{large 2n}equiv (color{#c00}{5^{large 2}})^{large n}equiv color{#c00}1^{large n}equiv 1 $
$endgroup$
– Bill Dubuque
2 hours ago
$begingroup$
What does the triple equal sign mean?
$endgroup$
– Sandi
2 hours ago
$begingroup$
25 leaves a remainder of 1 when divided by 8 so it means they are "equivalent" under mod 8
$endgroup$
– Eleven-Eleven
2 hours ago
$begingroup$
@Sandi this is the common way to write congruences.
$endgroup$
– Mark
2 hours ago
1
1
$begingroup$
Hint: $bmod 8!: color{#c00}{5^{large 2}equiv 1},Rightarrow, 5^{large 2n}equiv (color{#c00}{5^{large 2}})^{large n}equiv color{#c00}1^{large n}equiv 1 $
$endgroup$
– Bill Dubuque
2 hours ago
$begingroup$
Hint: $bmod 8!: color{#c00}{5^{large 2}equiv 1},Rightarrow, 5^{large 2n}equiv (color{#c00}{5^{large 2}})^{large n}equiv color{#c00}1^{large n}equiv 1 $
$endgroup$
– Bill Dubuque
2 hours ago
$begingroup$
What does the triple equal sign mean?
$endgroup$
– Sandi
2 hours ago
$begingroup$
What does the triple equal sign mean?
$endgroup$
– Sandi
2 hours ago
$begingroup$
25 leaves a remainder of 1 when divided by 8 so it means they are "equivalent" under mod 8
$endgroup$
– Eleven-Eleven
2 hours ago
$begingroup$
25 leaves a remainder of 1 when divided by 8 so it means they are "equivalent" under mod 8
$endgroup$
– Eleven-Eleven
2 hours ago
$begingroup$
@Sandi this is the common way to write congruences.
$endgroup$
– Mark
2 hours ago
$begingroup$
@Sandi this is the common way to write congruences.
$endgroup$
– Mark
2 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
First of all it is easy to see that $5^2equiv 1$ (mod $8$). We also know that $133=66times 2+1$. Hence
$5^{133}equiv 5^{2times 66+1}equiv 5times (5^2)^{66}equiv 5times 1^{66}equiv 5$ (mod $8$).
$endgroup$
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
|
show 1 more comment
$begingroup$
"Highbrow method":
If you undertake to learn any number theory , there is Euler's theorem: $$a^{varphi (n)}cong1pmod n$$, for $a$ relatively prime to $n$.
($varphi$ is Euler's totient function, and just returns the number of positive integers less than $n$ that are relatively prime to $n$.)
Now $varphi (8)=4$. Hence $5^4cong1pmod8.$
Use this to reduce the exponent: $133=4×33+1implies5^{133}=(5^4)^{33}cdot 5cong5pmod8$.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3116896%2fhow-to-calculate-mod-of-number-with-big-exponent%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
First of all it is easy to see that $5^2equiv 1$ (mod $8$). We also know that $133=66times 2+1$. Hence
$5^{133}equiv 5^{2times 66+1}equiv 5times (5^2)^{66}equiv 5times 1^{66}equiv 5$ (mod $8$).
$endgroup$
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
|
show 1 more comment
$begingroup$
First of all it is easy to see that $5^2equiv 1$ (mod $8$). We also know that $133=66times 2+1$. Hence
$5^{133}equiv 5^{2times 66+1}equiv 5times (5^2)^{66}equiv 5times 1^{66}equiv 5$ (mod $8$).
$endgroup$
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
|
show 1 more comment
$begingroup$
First of all it is easy to see that $5^2equiv 1$ (mod $8$). We also know that $133=66times 2+1$. Hence
$5^{133}equiv 5^{2times 66+1}equiv 5times (5^2)^{66}equiv 5times 1^{66}equiv 5$ (mod $8$).
$endgroup$
First of all it is easy to see that $5^2equiv 1$ (mod $8$). We also know that $133=66times 2+1$. Hence
$5^{133}equiv 5^{2times 66+1}equiv 5times (5^2)^{66}equiv 5times 1^{66}equiv 5$ (mod $8$).
edited 2 hours ago
J. W. Tanner
2,0491116
2,0491116
answered 2 hours ago
MarkMark
8,113420
8,113420
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
|
show 1 more comment
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
1
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
$begingroup$
Should the first triple-equal sign on the second row not be a normal equal sign? And the second one too?
$endgroup$
– Sandi
2 hours ago
1
1
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
Yes, you can also write regular equality there. But if two numbers are equal in $mathbb{Z}$ then they are also congruent mod $n$ for any $ninmathbb{N}$, and because we only care about congruence here I decided to write congruence from the beginning.
$endgroup$
– Mark
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
$begingroup$
I don't understand how you do the step $5 times (5^2)^{66} equiv 5 times 1^{66} (mathrm{mod} 8)$. Could you clarify please?
$endgroup$
– Sandi
2 hours ago
1
1
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
$5^2equiv 1$(mod $8$), hence $(5^2)^{66}equiv 1^{66}equiv 1$(mod $8$). That's it. It all follows from a basic theorem on modular arithmetic: that if $aequiv b$(mod $n$) and $cequiv d$(mod $n$) then $abequiv cd$(mod $n$). In other words multiplication mod $n$ is well defined. (same thing can we said about sum mod $n$)
$endgroup$
– Mark
2 hours ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
$begingroup$
I found a similar thing in my book, but it said that $ac equiv bd (modn)$. Did you make a typo or is it a different theorem?
$endgroup$
– Sandi
1 hour ago
|
show 1 more comment
$begingroup$
"Highbrow method":
If you undertake to learn any number theory , there is Euler's theorem: $$a^{varphi (n)}cong1pmod n$$, for $a$ relatively prime to $n$.
($varphi$ is Euler's totient function, and just returns the number of positive integers less than $n$ that are relatively prime to $n$.)
Now $varphi (8)=4$. Hence $5^4cong1pmod8.$
Use this to reduce the exponent: $133=4×33+1implies5^{133}=(5^4)^{33}cdot 5cong5pmod8$.
$endgroup$
add a comment |
$begingroup$
"Highbrow method":
If you undertake to learn any number theory , there is Euler's theorem: $$a^{varphi (n)}cong1pmod n$$, for $a$ relatively prime to $n$.
($varphi$ is Euler's totient function, and just returns the number of positive integers less than $n$ that are relatively prime to $n$.)
Now $varphi (8)=4$. Hence $5^4cong1pmod8.$
Use this to reduce the exponent: $133=4×33+1implies5^{133}=(5^4)^{33}cdot 5cong5pmod8$.
$endgroup$
add a comment |
$begingroup$
"Highbrow method":
If you undertake to learn any number theory , there is Euler's theorem: $$a^{varphi (n)}cong1pmod n$$, for $a$ relatively prime to $n$.
($varphi$ is Euler's totient function, and just returns the number of positive integers less than $n$ that are relatively prime to $n$.)
Now $varphi (8)=4$. Hence $5^4cong1pmod8.$
Use this to reduce the exponent: $133=4×33+1implies5^{133}=(5^4)^{33}cdot 5cong5pmod8$.
$endgroup$
"Highbrow method":
If you undertake to learn any number theory , there is Euler's theorem: $$a^{varphi (n)}cong1pmod n$$, for $a$ relatively prime to $n$.
($varphi$ is Euler's totient function, and just returns the number of positive integers less than $n$ that are relatively prime to $n$.)
Now $varphi (8)=4$. Hence $5^4cong1pmod8.$
Use this to reduce the exponent: $133=4×33+1implies5^{133}=(5^4)^{33}cdot 5cong5pmod8$.
edited 1 hour ago
answered 1 hour ago
Chris CusterChris Custer
13.6k3827
13.6k3827
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3116896%2fhow-to-calculate-mod-of-number-with-big-exponent%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Hint: $bmod 8!: color{#c00}{5^{large 2}equiv 1},Rightarrow, 5^{large 2n}equiv (color{#c00}{5^{large 2}})^{large n}equiv color{#c00}1^{large n}equiv 1 $
$endgroup$
– Bill Dubuque
2 hours ago
$begingroup$
What does the triple equal sign mean?
$endgroup$
– Sandi
2 hours ago
$begingroup$
25 leaves a remainder of 1 when divided by 8 so it means they are "equivalent" under mod 8
$endgroup$
– Eleven-Eleven
2 hours ago
$begingroup$
@Sandi this is the common way to write congruences.
$endgroup$
– Mark
2 hours ago