1

Having trouble trying to understand how to tackle this question. $19^{16} \mod{20413}$. When approaching this question I understand the steps involved such as $19^{16} / 20413 = 1.413028039\cdot10^{16}$. However not sure what to subtract this answer to achieve a $0$ before the decimal point in order to multiply by $20413$ to get the answer. From the answer sheet the intended answer is $11546$.

Appreciate the help.

Radar
  • 41
  • 1
    Welcome to Mathematics Stack Exchange. You could find the remainder when $19^4$ is divided by $20413$ and then the remainder when the fourth power of that is divided by $20413$ – J. W. Tanner Apr 28 '19 at 13:57
  • @J.W.Tanner Just to clarify is this what is meant. 19^4 / 20413 = 6.384215941= 6.384215941^4 = 1661.231942-1661=0.231942 * 20413 = 4734.632046. However the answer should instead be 11546. Thanks for the help. – Radar Apr 28 '19 at 14:55
  • I meant $19^4 \div 20413 = 6$ with remainder $19^4-20413\times6=7843$ – J. W. Tanner Apr 28 '19 at 15:24
  • @J.W.Tanner Oh nahh understood how to do it for that question struggling to understand how to do it for 19^16 mod 20413. To give some context ill try to show the question and the mark scheme to it in the comment below. – Radar Apr 28 '19 at 15:32
  • @J.W.Tanner I wish to receive messages encoded with the RSA public key cryptosystem. My public key is 20413, 33. The language is English and the alphabet consists of the 26 capital letters A,B,. . . ,Z and the letter b which represents space between words (27 letters in all); these letters are numbered as usual from 0 to 26, respectively.
    1. Encipher the plaintext TODAY, using

    (a) single letter blocks;

    – Radar Apr 28 '19 at 15:33
  • @J.W.Tanner T O D A Y ↓ ↓ ↓ ↓ ↓ 19 14 3 0 24 All calculations with modulus 20413. n 19n 1 19 2 361 4 7843 8 8280 16 11546 32 13226 33 6338 n 14n 1 14 2 196 4 18003 8 10808 16 9678 32 8840 33 1282 n 3 n 1 3 2 9 4 81 8 6561 16 16117 32 2264 33 6792 n 0 n 1 0 2 0 4 0 8 0 16 0 32 0 33 0 n 24n 1 24 2 576 4 5168 8 8020 16 19450 32 8784 33 6686 The ciphertext is 6338,1282,6792,0,6686. – Radar Apr 28 '19 at 15:34
  • @J.W.Tanner Just to give some context the comment above is the answer to proposed question. If it seems complex no problem, thanks for the help anyways. – Radar Apr 28 '19 at 15:36

2 Answers2

2

$$19^2=361$$ $$19^4=361^2=130321\equiv 7843 \pmod {20413}$$ $$19^8\equiv 7843^2 \equiv 8280 \pmod {20413}$$ $$19^{16}\equiv 8280^2\equiv 11546 \pmod {20413}$$

J. W. Tanner
  • 60,406
  • Perfect! Thanks for the help now fully understand, appreciate it. – Radar Apr 28 '19 at 15:40
  • and if you're weird like me, you can figure out the quotient is 9 mod 19 –  Apr 28 '19 at 19:22
  • @RoddyMacPhee: what quotient is 9 mod 19 ? – J. W. Tanner Apr 28 '19 at 19:28
  • the quotient of $19^{16}$ and $20413$, this comes from your remainder. $$19^{16}\equiv 0\bmod 19\20413\equiv 7\bmod 19\11546\equiv 13 \bmod 19\0-13\equiv 7\cdot 9 \bmod 19$$ –  Apr 28 '19 at 19:32
  • @RoddyMacPhee: Oh, you mean $19^{\color{red}16}$ – J. W. Tanner Apr 28 '19 at 19:35
  • @J.W.Tanner Method works but only for when n= a multiple. However how would the method work if n = 33 using your current method the answer would equal to 8079 however needs to be 6338. Appreciate the help so far. – Radar Apr 29 '19 at 13:15
0

From a simple minded standpoint, what they’re asking you to do is calculate $19^{16}$, which is equal to $288441413567621167681$, divide by $20413$, and give the remainder as your answer. Needless to say, you can’t do this on a calculator. By hand, if you’ve remembered how to do long division, you’ll get $11546$.

But since $20413$ is not prime, but rather equal to $137\cdot149$, this can also be done by making use of the Chinese Remainder Theorem. All in all, I think the most efficient way is just what @JWTanner has given you.

J. W. Tanner
  • 60,406
Lubin
  • 62,818