Message Boards Message Boards

0
|
318 Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to calculate the result only i.e. the number

Posted 5 days ago

for the equation:

Mod[sq(Mod[sq(Mod[sq(Mod[sq(Mod[14, 2^136279841-1])-2, 2^136279841-1])-2, 2^136279841-1])-2, 2^136279841-1])-2, 2^136279841-1]
POSTED BY: John Deere
5 Replies

If sq means simply square, then the result is 2005956546822746114

The code looks like a trick code because the inner Mod[] has a simple result equal to 14 ;)

We can compute manually the result:

14^2 - 2 = 194
194^2-2 = 37634
37634^2 - 2 = 1416317954
1416317954^2 - 2 = 2005956546822746114

The code itself looks like this:

Mod[
 Mod[Mod[Mod[Mod[14, 2^136279841 - 1]^2 - 2, 2^136279841 - 1]^2 - 2, 
     2^136279841 - 1]^2 - 2, 2^136279841 - 1]^2 - 2, 2^136279841 - 1]

If sq means square root, then the code presented by Gianluca seems to be the right:

Mod[Sqrt[
  Mod[Sqrt[
     Mod[Sqrt[
       Mod[Sqrt[Mod[14, 2^136279841 - 1]] - 2, 2^136279841 - 1]] - 2, 
      2^136279841 - 1]] - 2, 2^136279841 - 1] - 2], 2^136279841 - 1] //
  N
Mod[Sqrt[
   Mod[Sqrt[
      Mod[Sqrt[
         Mod[Sqrt[Mod[14, 2^136279841 - 1]] - 2, 2^136279841 - 1]] - 
        2, 2^136279841 - 1]] - 2, 2^136279841 - 1]] - 2, 
 2^136279841 - 1]
% // N
POSTED BY: Gianluca Gorni
Posted 5 days ago
sq[x_] := x*x;
Mod[
  sq[Mod[
       sq[Mod[
            sq[Mod[
                 sq[Mod[14, 2^136279841 - 1]] - 2, 2^136279841 - 1]] - 2, 2^136279841 - 1]] - 2, 2^136279841 - 1]] - 2, 2^136279841 - 1]
POSTED BY: Eric Rimbey
Posted 5 days ago

What is sq?

POSTED BY: Eric Rimbey
Posted 5 days ago

Square of number. E.g. sq(2) = 4

POSTED BY: John Deere
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract