Question

In: Computer Science

Compute 20191023 mod 7 without using calculator. Show every step.

Compute 20191023 mod 7 without using calculator. Show every step.

Solutions

Expert Solution

To find the remainder(modulus operator) without using a calculator , we need to find prime factors of the number.

Suppose a number n can be written as n = a*b where a and b are prime numbers, and we need to find the remainder of n with a number c, i.e n%c, then remainder can be calculated as n%c = (a%c)*(b%c). If the result is a number greater than c, then we calculate the remainder of the result with c again to get our desired result.

Similarly for n = a*b*c where a,b,c are prime numbers , n%d = (a%d)*(b%d)*(c%d) and calculating remainder again if result was greater than d.

For eg: to calculate 2491 mod 6, 2491 can be written as 53*47

So 2491%6 = (53%6)*(47%6) = 5*5 = 25

As 25 is greater than 6, we calculate 25%6 which is equal to 1 and that is our desired answer.

Now,

20191023 = 3*3*397*5651 where all of these are prime numbers

20191023%7 = (3%7)*(3%7)*(397%7)*(5651%7) = 3*3*5*2 = 90

As 90 is greater than 7, we calculate 90%7 = 6

And 6 is our desired answer!


Related Solutions

compute 7^-1 mod 11? in details
compute 7^-1 mod 11? in details
a) Use Fermat’s little theorem to compute 52003 mod 7, 52003 mod 11, and 52003 mod 13.
  a) Use Fermat’s little theorem to compute 52003 mod 7,52003 mod 11, and 52003 mod 13. b) Use your results from part (a) and the Chinese remaindertheorem to find 52003 mod 1001. (Note that1001 = 7 ⋅ 11 ⋅ 13.)
Show that if a and b are integers with a ≡ b (mod p) for every...
Show that if a and b are integers with a ≡ b (mod p) for every prime p, then it must be that a = b
Plot the function without using a calculator, as you will not have a calculator on the...
Plot the function without using a calculator, as you will not have a calculator on the exams. a. ? = 34 sin ?, from t = 0 to the end of the first cycle only. b. ? = 2sin3?, from t = 0 to the end of the second cycle only. c. ? = 2cos3?, from t = 0 to the end of the second cycle only. d. ? = 2sin??, from t = 0 to the end of the...
1. Compute 312 mod 12 2. Find the multiplicative inverse of 7 in Z19 (i.e., mod...
1. Compute 312 mod 12 2. Find the multiplicative inverse of 7 in Z19 (i.e., mod 19) Please show your work and thank you
Compute the following: (a) 13^2018 (mod 12) (b) 8^11111 (mod 9) (c) 7^256 (mod 11) (d)...
Compute the following: (a) 13^2018 (mod 12) (b) 8^11111 (mod 9) (c) 7^256 (mod 11) (d) 3^160 (mod 23)
(show step by step calculation and formula, no excel or fina calculator) Based on the below...
(show step by step calculation and formula, no excel or fina calculator) Based on the below cash flows, HappyBear Ltd. uses the NPV decision rule. At a required return of 12 percent, should the firm accept this project? What if the required return is 30 percent? Year Cash Flow 0 -$32,000 1 16,000 2 20,000 3 17,000
PLEASE BE VERY SPECIFIC AND SHOW EVERY SINGLE STEP IN DETAIL, SPECIALLY IF USING R PROGRAM....
PLEASE BE VERY SPECIFIC AND SHOW EVERY SINGLE STEP IN DETAIL, SPECIALLY IF USING R PROGRAM. (I NEED MORE HELP WITH PART D AND E!!!) A bottling company uses a machine to fill bottles with a tasty beverage. The bottles are advertised to contain 300 milliliters (ml), but in reality the amount varies according to a normal distribution with mean μ=298ml and standard deviation σ=3 ml. (For this problem, we’ll assume σσ is known and carry out the calculations accordingly)....
0 mod 35 = 〈0 mod 5, 0 mod 7〉 12 mod 35 = 〈2 mod...
0 mod 35 = 〈0 mod 5, 0 mod 7〉 12 mod 35 = 〈2 mod 5, 5 mod 7〉 24 mod 35 = 〈4 mod 5, 3 mod 7〉 1 mod 35 = 〈1 mod 5, 1 mod 7〉 13 mod 35 = 〈3 mod 5, 6 mod 7〉 25 mod 35 = 〈0 mod 5, 4 mod 7〉 2 mod 35 = 〈2 mod 5, 2 mod 7〉 14 mod 35 = 〈4 mod 5, 0 mod 7〉...
Step by step without financial calculator functions: Your firm has just issued a 20-year $1,000.00 par...
Step by step without financial calculator functions: Your firm has just issued a 20-year $1,000.00 par value, 10% annual coupon bond for a net price of $964.00. What is the yield to maturity? Don't use a financial calculator to determine your answer. A) 10.60% B) 11.10% C) 10.44% D) 10.16%
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT