Re: Q in mathematica ??

*To*: mathgroup at smc.vnet.net*Subject*: [mg128999] Re: Q in mathematica ??*From*: Murray Eisenberg <murray at math.umass.edu>*Date*: Fri, 7 Dec 2012 01:41:53 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net*References*: <20121206100133.BD4146921@smc.vnet.net>

On Dec 6, 2012, at 5:01 AM, Q in mathematica <baha791 at gmail.com> 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 straightforward: Resolve[ForAll[{a, n}, (IntegerQ[a] && IntegerQ[n] && GCD[a, n] == 1) ~Implies~ (Mod[a^EulerPhi[n], n] == 1) ]] True Or, the same thing without the quantification: (IntegerQ[a] && IntegerQ[n] && GCD[a, n] == 1) ~Implies~ (Mod[a^EulerPhi[n], n] == 1) True --- Murray Eisenberg murray at math.umass.edu 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

**References**:**Q in mathematica ??***From:*Q in mathematica <baha791@gmail.com>