Interview Question: Difference between revisions
From charlesreid1
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
Expression simplifies to 5 to the 5 mod 11, or 3125 mod 11 | Expression simplifies to 5 to the 5 mod 11, or 3125 mod 11 | ||
Divisibility trick for 11: Start with right most digit, and sum up the odd terms. Then start with the tens place digit, and sum up the even terms. Compute the quantity odd minus even. This is the remainder when you divide by 11. | |||
Revision as of 03:44, 24 January 2017
My interview question:
Tetration.
Notation for progressively larger numbers.
What is the remainder when you divide the number 5 tetrated by 11?
Use the following property: $a^p mod(p)$
5 tetrated can be written as 5 to the power of 5^5^5^5 mod 10, mod 11
Simplify that mod 10 expression - 5 to any power is 5, so power simplifies to 5
Expression simplifies to 5 to the 5 mod 11, or 3125 mod 11
Divisibility trick for 11: Start with right most digit, and sum up the odd terms. Then start with the tens place digit, and sum up the even terms. Compute the quantity odd minus even. This is the remainder when you divide by 11.