# ex2 - Gap commands Each expresion nishes with an Modular...

This preview shows page 1. Sign up to view the full content.

Gap commands Each expresion finishes with an ; Product, addition, subtraction, integer division and powers: gap> 2*3; 6 gap> 2+3; 5 gap> 2-3; -1 gap> 6/3; 2 gap> 2^3; 8 Factors of a positive integer and prime numbers: gap> Factors(704); [ 2, 2, 2, 2, 2, 2, 11 ] gap> IsPrime(17); true gap> IsPrime(15); false The MCD: gap> Gcd( 92,391); 23 Euler Phi function: gap> Phi(32); 16 Taking the integerpart of a k -th root (number, k ): gap> RootInt(50653,3); 37 gap> 37^3; 50653 Modular arithmetic: gap> 234 mod 7; 3 gap> ((4*31*4*6)+(4*9*25*3)) mod 1116; 96 gap> 2^96 mod 1117; 507 gap> (5^672) mod 2017; 294 gap> (5^672)^2 mod 2017; 1722 gap> 294^2 mod 2017; 1722 gap> 3^(-1) mod 391; 261 gap> 3*261 mod 391; 1 Chinese Remainder Theorem;
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern