The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Q in mathematica ??
Replies: 2   Last Post: Dec 8, 2012 1:28 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Murray Eisenberg

Posts: 2,105
Registered: 12/6/04
Re: Q in mathematica ??
Posted: Dec 7, 2012 1:38 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Dec 6, 2012, at 5:01 AM, Q in mathematica <> wrote:

> Write Mathematica Blocks that can solve the problem.
> Write a code that verifies Fermat' s Little Theorem which says that

: If [Phi](n) is the Euler Phi of n, i.e. the number of positive
integers less than or equal to n which are relatively prime to n, then
a^[Phi](n)[Congruent]1mod n for all a relatively prime to n.

I hope that wasn't a homework exercise you were asked to do, as it's

Resolve[ForAll[{a, n},
(IntegerQ[a] && IntegerQ[n] && GCD[a, n] == 1)
(Mod[a^EulerPhi[n], n] == 1)

Or, the same thing without the quantification:

(IntegerQ[a] && IntegerQ[n] && GCD[a, n] == 1)
(Mod[a^EulerPhi[n], n] == 1)

Murray Eisenberg
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2838 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.