Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12674 > unrolled thread
| Started by | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| First post | 2012-12-07 06:38 +0000 |
| Last post | 2012-12-08 06:28 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Q in mathematica ?? Murray Eisenberg <murray@math.umass.edu> - 2012-12-07 06:38 +0000
Re: Q in mathematica ?? // answering someone's homework Richard Fateman <fateman@cs.berkeley.edu> - 2012-12-08 06:28 +0000
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Date | 2012-12-07 06:38 +0000 |
| Subject | Re: Q in mathematica ?? |
| Message-ID | <k9s2sq$mq1$1@smc.vnet.net> |
On Dec 6, 2012, at 5:01 AM, Q in mathematica <baha791@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@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
[toc] | [next] | [standalone]
| From | Richard Fateman <fateman@cs.berkeley.edu> |
|---|---|
| Date | 2012-12-08 06:28 +0000 |
| Subject | Re: Q in mathematica ?? // answering someone's homework |
| Message-ID | <k9ummj$sic$1@smc.vnet.net> |
| In reply to | #12674 |
On 12/6/2012 10:38 PM, Murray Eisenberg wrote: > On Dec 6, 2012, at 5:01 AM, Q in mathematica <baha791@gmail.com> wrote: > > > I hope that wasn't a homework exercise you were asked to do, as it's > straightforward: If you thought it was a homework problem, you shouldn't have posted the answer. What else could it be other than homework? The way such questions are handled on the comp.lang.lisp newsgroup is to provide an extraordinarily complex and sophisticated answer to the (suspected) homework question... so that the student who naively hands in it is immediately under suspicion. Upon questioning, the student can't explain what is going on. Alternatively, the student studies the sophisticated answer and learns much more than is necessary to actually answer the question from first principles. RJF
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web