f ( x ) = x x x x
For f ( x ) as defined above, find the last two digits of f ( 1 7 ) + f ( 1 8 ) + f ( 1 9 ) + f ( 2 0 ) .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Thank you, I just have a question if possible, can it be solved in Python. I was trying to define the function but it was giving invalid syntax.
Log in to reply
Obviously it can, any programming language can do too. But we have to handle the very big numbers. Python only provides 16-digit numbers. There can be module available for such big numbers.
@Hana Wehbi , like I have mentioned before, the objective in Brilliant is not just get the answer but learning math. Why take the trouble to do coding when Wolfram Alpha can solve the problems here. I suspect Kyle T has used software to solve the problem, because no steps are shown. If that is the case, it would be better for Kyle to mentioned the software at least everyone learn something extra from the problem.
My solution here give everyone a short course about Number Theory. I knew nothing about Number Theory before I joined Brilliant. Your problem is a good problem because I have used all the theories and techniques I have ever learnt about Number Theory and I have demonstrated the use here. Instead of asking about Number Theory, you asked me about Python coding. Sorry, I am assuming you know nothing about Number Theory.
Knowing Number Theory will make computing easier. That is why we learn about Number Theory. The number f ( 1 7 ) for example has 1 0 2 1 digits. Even if there is no syntax error (you must have keyed in something not acceptable by Python), we need expertise to handle such big number. Using the techniques I show, we only need to handle effectively 2-digit number. Using Number Theory we only need to handle small numbers.
@Chew-Seong Cheong , thank you for a nice solution. The reason l asked because recently l am learning coding and l am trying to implement that in solving problems. There was nothing against your techniques and methods. Also, l know Number Theory, l solved this problem similar to yours, l will post my solution soon.
Log in to reply
I was not saying you are against my solution. I was saying you seem to misunderstand the objective of Brilliant.org.
This is my solution, I have definitely used Euler's Theorem
Problem Loading...
Note Loading...
Set Loading...
Let us consider the four f ( x ) m o d 1 0 0 separately. Since g cd ( 1 7 , 1 0 0 ) = 1 , we can apply Euler's theorem and use Carmichael's lambda function λ ( ⋅ ) . Note that λ ( 1 0 0 ) = 2 0 and λ ( 2 0 ) = 4 . Then
f ( 1 7 ) ≡ 1 7 1 7 1 7 1 7 m o d 4 m o d 2 0 (mod 100) ≡ 1 7 1 7 ( 1 6 + 1 ) 1 7 m o d 4 m o d 2 0 (mod 100) ≡ 1 7 1 7 1 m o d 2 0 (mod 100) ≡ 1 7 1 7 (mod 100) ≡ 1 7 ( 2 8 9 ) 8 (mod 100) ≡ 1 7 ( 9 0 − 1 ) 8 (mod 100) ≡ 1 7 ( − 7 2 0 + 1 ) (mod 100) ≡ 1 7 ( − 1 9 ) (mod 100) ≡ − 2 3 (mod 100) ≡ 7 7 (mod 100)
Since g cd ( 1 8 , 1 0 0 ) = 1 , we have to use Chinese remainder theorem and consider f ( 1 8 ) m o d 4 and f ( 1 8 ) m o d 2 5 separately.
f ( 1 9 ) ≡ 1 9 1 9 1 9 1 9 m o d λ ( 1 0 0 ) ≡ 1 9 ( 2 0 − 1 ) 1 9 1 9 m o d 2 0 ≡ 1 9 1 9 (mod 100) ≡ ( 2 0 − 1 ) 1 9 ≡ ( 3 8 0 − 1 ) ≡ 7 9 (mod 100)
And f ( 2 0 ) ≡ 2 0 2 0 2 0 2 0 ≡ 0 (mod 100)
Therefore, f ( 1 7 ) + f ( 1 8 ) + f ( 1 9 ) + f ( 2 0 ) = 7 7 + 7 6 + 7 9 + 0 ≡ 3 2 (mod 100) .