# mod 7

• Nov 24th 2013, 04:45 AM
Melody2
mod 7
find the smallest positive integer b which satisfies 3^56=b(mod7)

I am very new to modular arithmetic and I stubbled upon this question.
Wouldn't 'b' have a specific solution.
Asking for the smallest positive integer b confuses me.

$3^{56} - b = 7k \;\;\text{ Where k is an integer}$

when I put 3^56 into my calculator or into Excel i get a rounded answer. This also surprised me a little.
The calculator doesn't have enough digits, so there is no enigma there.
But why does Excel round? I think the last digit has to be 1, and excel just gives about 15 places and then a stack of zeros.
Can you set excel to give more acuracy? I guess that this is a second question.

This is it for me. would someone like to add input please.
• Nov 24th 2013, 07:20 AM
Idea
Re: mod 7
You need a bigger calculator

$3^{56}=523 347 633 027 360 537 213 511 521$
• Nov 24th 2013, 08:42 AM
topsquark
Re: mod 7
Quote:

Originally Posted by Melody2
find the smallest positive integer b which satisfies 3^56=b(mod7)

I am very new to modular arithmetic and I stubbled upon this question.
Wouldn't 'b' have a specific solution.
Asking for the smallest positive integer b confuses me.

$3^{56} - b = 7k \;\;\text{ Where k is an integer}$

when I put 3^56 into my calculator or into Excel i get a rounded answer. This also surprised me a little.
The calculator doesn't have enough digits, so there is no enigma there.
But why does Excel round? I think the last digit has to be 1, and excel just gives about 15 places and then a stack of zeros.
Can you set excel to give more acuracy? I guess that this is a second question.

This is it for me. would someone like to add input please.

Note that $3^6 \equiv 1~\text{mod 7}$

We have 56 = 9 * 6 + 2, so
$3^{56} \equiv \left ( 3^6 \right ) ^9 \cdot 3^2 \equiv 1 \cdot 2 \equiv 2~\text{mod 7}$

If you want all the digits of 3^(56), see here. It's free.

-Dan
• Nov 24th 2013, 02:28 PM
Melody2
Re: mod 7
Thanks Idea
I responded to you in the wee hours but I must not have pressed 'reply'
I was thinking of writing Santa a note, but now Dan has shown me I don't have to.
(Unless I am visiting the regional Australia where there is no internet coverage.)
Melody
• Nov 24th 2013, 02:29 PM
Melody2
Re: mod 7
Thanks Dan
That is exactly what I was hoping for.
Melody