Finding the last 1/2/3 digits of a number

Can anyone help me or actually tell me the steps to finding the last 1/2/3 digits of a big number like this 52875435^{287^{543}}

I need it badly........

Note by Nishant Sharma
8 years, 1 month ago

No vote yet
2 votes

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

5^(287^543) mod 1000

Note that the last 3 digits of 5^3, 5^4, 5^5, 5^6 are 125, 625, 125, 625

This suggests that 5^(odd number>1) mod 1000 = 125, and 5^(even number>2) mod 1000 = 625

You can prove the above by induction.

Since 287^543 is a multiplication of odd numbers, then it must be an odd number as well.

Thus 5^(287^543) mod 1000 = 5^(odd number>1) mod 1000 = 125

Pi Han Goh - 8 years, 1 month ago

Log in to reply

Thanks for the simple sol. But what I want to know is that is there any way out other than using modulo arithmetic and for a general case? Like \6336775\6^{336^{775}} ?

Nishant Sharma - 8 years, 1 month ago

Log in to reply

There's no escaping modulo arithmetic :)

It is obvious that 6^(336^775) is a multiple of 8, to find the last three digits, it suffices to find what it is congruent to modulo 125

By binomial theorem,

(5+1)^M is congruent to 1 + 5M + 25 MC2 modulo 125

It suffices to find the congruence of M modulo 25 and MC2 modulo 5

For your example: M = 336^775

MC2 = (M)(M-1)/2

and (M -1) is obviously a multiple of 5, thus MC2 is a multiple of 5

M is congruent to 11^775 modulo 25

11^5 is congruent to 1 modulo 25.

M is congruent to 1 modulo 25.

(5+1)^M is congruent to 1 + 5M + 25 MC2 modulo 125

which is congruent to 6 modulo 125

and is thus congruent to 256 modulo 1000

Also, the original question - to find 5^(287^543) modulo 1000 is even simpler. As this number is obviously a multiple of 125, it suffices to find what it is congruent to modulo 8

5^2 = 25 congruent to 1 mod 8, thus 5^(287^543) is congruent to 5 mod 8

the only multiple of 125 less than 1000 congruent to 5 mod 8 is 125, so we are done

You can solve in general by solving for the congruence mod 125 and mod 8. 5 and 6 are easier since they give a lot of free information, but this approach can be generalized reasonably easily.

Gabriel Wong - 8 years, 1 month ago

Log in to reply

@Gabriel Wong Your solution was a bit twisty for me(since i am not comfortable with modulo arithmetic) but i would like to ask u that should we check for the congruence mod 125 for any base ?

Nishant Sharma - 8 years, 1 month ago

Work out mod 10, mod 100, mod 1000 respectively.

Bhargav Das - 8 years, 1 month ago

Log in to reply

Actually i don't know how to do that. I'd be grateful 2 u if u could explain a bit further.

Nishant Sharma - 8 years, 1 month ago

Log in to reply

Modulo Arithmetic

Aditya Parson - 8 years, 1 month ago

Easy way to do it? Keep multiplying until you find a pattern.

Kenneth Chan - 8 years, 1 month ago

010000180*

Mahmoud El ashmawy - 3 years, 1 month ago
×

Problem Loading...

Note Loading...

Set Loading...