Legend has it that my school has a really long blackboard. A reaaaally long blackboard. (I know, that's a really mundane way to start off a question. Please don't judge me.)
On this board, I write out the decimal representation of all the integers from 1 to 1 0 1 0 0 , and it takes 0 . 0 1 seconds to write each digit; the total time in seconds is T .
I then choose two numbers at random a and b and replace both with a single number a + a b + b . After some number of iterations, the single number left is of the form ( n + 1 ) ! − 1 .
Find
⌊ T ⌋ ( m o d lo g 1 0 ( n ) )
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.
This was the original unabridged version:
Legend has it that my school has a really long blackboard. A reaaaally long blackboard. (I know, that's a really mundane way to start off a question. Please don't judge me.)
While I was unbelievably board one day, I decided to write out all the positive integers from 1 to a googol in their decimal representation on this board, thinking that evaluating the time it took for me to write out all those numbers would make a good Brilliant problem.
Alas, even though each digit took me a mere 0 . 0 1 seconds to write, the total time T it took me to write out all those digits was mind-breakingly long (I say that without hyperbole).
I decided, then, that I would have to let the answer be ⌊ T ⌋ m o d some integer. Leaving this "some integer" to fate, I eliminated numbers two at a time, replacing each a and b with a + a b + b . Iterating the process until a single string of digits was left, I found myself at the end of the number, staring towards the left: there were 9s, lots and lots of 9s; "Surely, this is cannot be a work of the hand of chance." I thought.
Adding 1, I saw emerging from this lake of 9s a multitude of trailing 0s. Glancing at the entire number, I knew then that this number was of the form ( n + 1 ) ! . Inspired by the epic nature of the factorial, I decided to post a problem on Brilliant (you're reading it right now). The problem is as follows:
Find
⌊ T ⌋ ( m o d lo g 1 0 ( n ) )
Log in to reply
This is a very fancy way of saying mod 100
Excellent Question! Did it the same way:D
Problem Loading...
Note Loading...
Set Loading...
Step 1:
The number of decimal digits of the integers from 1 to 1 0 1 0 0 − 1 is
S = k = 1 ∑ 1 0 0 ( 9 k × 1 0 k )
This is due to there being 9 integers from 1 to 9 (1 digit), 90 integers from 10 to 99 (2 digits), 900 integers from 100-999 (3 digits), etc.
Because 1 0 1 0 0 has 101 digits, 1 0 0 T = 1 0 1 + S .
Step 2:
Now, consider the product
k = 1 ∏ 1 0 1 0 0 ( a k + 1 )
where { a 1 , a 2 , … } is a permutation of the integers from 1 to 1 0 1 0 0 . Note that this is an invariant under iteration of a + a b + b = ( a + 1 ) ( b + 1 ) − 1 .
Since this product is ( 1 0 1 0 0 + 1 ) ! at the beginning, the number at the end will be ( 1 0 1 0 0 + 1 ) ! − 1 , our n = 1 0 1 0 0 . Thus, n = 1 0 1 0 0 and lo g 1 0 ( n ) = 1 0 0 .
Step 3:
It is then obvious that ⌊ T ⌋ ( m o d 1 0 0 ) is asking for the digits in the hundreds and thousands place of 1 0 0 T = 1 0 1 + S . To find this, we must evaluate T ( m o d 1 0 0 0 0 ) . Since
S = k = 1 ∑ 1 0 0 ( 9 k × 1 0 k ) ≡ k = 1 ∑ 3 ( 9 k × 1 0 k ) ≡ 8 8 9 0 ( m o d 1 0 0 0 0 )
we can therefore conclude
⌊ T ⌋ = ⌊ 8 8 9 0 1 0 1 + S ⌋ ≡ ⌊ 1 0 0 1 0 1 + 8 8 9 0 ⌋ ≡ 8 9 ( m o d 1 0 0 )