Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2014-09-05 15:52:16

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Modular Arithmetic

Evaluate: 7^7^7 mod 13


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#2 2014-09-05 20:14:34

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

When p is prime and a is not divisible by p:

By Fermats little theorem:

so we are left with

so


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2014-09-05 22:03:00

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Modular Arithmetic

I can't believe this!

From where did you get 12?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#4 2014-09-06 01:56:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

To make the formula work you need p - 1.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2014-09-06 02:11:22

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Modular Arithmetic

What is 68628?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#6 2014-09-06 02:12:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

12 * 68628 + 7 = 7^7

I can't believe this!

There are other ways to do this that do not invoke that formula.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2014-09-06 04:45:22

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Hi,

Can also be computed by using binary exponentiation.
In python,

pow(7, 7**7, 13)   # = 6

"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#8 2014-09-06 04:47:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

Hello gAr, Howdy!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2014-09-06 14:53:04

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Hello!
Hope you all are doing well.


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#10 2014-09-06 14:56:19

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

Howdy;

Just the same which I suppose is good. What have you been doing?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2014-09-06 18:24:14

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Hi,

That's good then.

I have been teaching and learning!


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#12 2014-09-06 18:27:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

Teaching? Who are you teaching?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#13 2014-09-06 18:38:09

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Teaching students as a part of my job.

Felt like company jobs are rubbish.


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#14 2014-09-06 18:41:00

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

Oh very good! I am glad to hear that. They have a good teacher.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#15 2014-09-06 18:46:23

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Modular Arithmetic

I am sorry, that was not the original question.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#16 2014-09-06 18:47:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

What is the question?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#17 2014-09-06 18:51:07

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Thanks!
Don't know whether I'll be good or not, giving it a try anyway.
You may remember me telling earlier that I did not want a teaching job, but now here I am!


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#18 2014-09-06 18:56:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

gAr meet my friend Agnishom. Agnishom, meet gAr! gAr does EM.

I have to go now and cook dinner see you all later.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#19 2014-09-06 19:07:49

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Okay, enjoy your dinner.


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#20 2014-09-06 21:16:20

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

Hi gAr;

Sorry about that. He came in at an odd time. I think you will find teaching can be rewarding personally.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#21 2014-09-07 03:12:41

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

Hi,

No problem.
I too hope so, all I need is time to chew on the bits and numbers!


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#22 2014-09-07 03:30:21

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

Will you throw some experimental math at them once in a while?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#23 2014-09-07 03:45:20

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

First trying to make them adept at programming.
Or else, they will get both the code and math wrong!


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#24 2014-09-07 03:50:01

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Modular Arithmetic

How old are they?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#25 2014-09-07 03:52:17

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Modular Arithmetic

About 18+


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

Board footer

Powered by FluxBB