Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

(A) Determine the 2500th digit (reading from left to right) in the base ten expansion of 10000!

(B) Determine the 2500th digit (reading from right to left) in the base ten expansion of 10000!

(C)Determine the 2500th digit (reading from left to right) 

in the base ten expansion of 1!*2!*3!*....*10000!

Edited by K Sengupta
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

For every factor of of 5 and 2 in a number there will be a trailing 0. In 10000! there will be no shortage of 2s but how many factors of 5?

10000! = 1 x 2 x 3 x ... x 10000.

There are 10000/5 = 2000 numbers here that have 1 factor of 5.

There are 10000/25 = 400 numbers here that have 2 factors of 5.

There are 10000/125 = 80 numbers here that have 3 factors of 5.

There are 10000/625 = 16 numbers here that have 4 factors of 5.

There are 3 numbers here that have 5 factors of 5.

Adding this up gives 2499. so 52499 is a factor of 10000!. This means that there will be 2499 trailing 0s. The 2499th digit is a 0, but the question asked for the 2500th digit. This is very cruel :mad: and I will have to think about this some more.

Link to comment
Share on other sites

  • 0

psychic-I am doing similar analysis but have different results

I think you are double counting some

I see it as 10000/5 = 2000 that *10

10000/50 = 200 that *100

10000/500 = 20 that *1000

10000/5000 = 2 that *10000

since each off the 100 are already included in the 10s you are only adding 1 more zero not 2 for each case of 100 and so on right up the line so now you add them together you get 2,222 zeros on the end of the answer

Link to comment
Share on other sites

  • 0

So I haven't analyzed your logic entirely, but it looks alright...so let's take the rest of the numbers that we're currently ignoring, we'll have a bunch of these 9*8*7*6*4*3*2*1 which is 72576, so since we're going to be multiplying this a bunch of times, no matter what, the ones digit will stay 6...meaning the 2500th will be 6.

Link to comment
Share on other sites

  • 0

So I haven't analyzed your logic entirely, but it looks alright...so let's take the rest of the numbers that we're currently ignoring, we'll have a bunch of these 9*8*7*6*4*3*2*1 which is 72576, so since we're going to be multiplying this a bunch of times, no matter what, the ones digit will stay 6...meaning the 2500th will be 6.

I was just about to post the very same :lol:.

Doctor Moshe:

Of the numbers 1 to 10000 we both agree that 2000 have factors of 5s. Of these 400 are multiples of 25, containing 2 factors of 5, so we must add 400 more factors of 5 in total. And continue this for higher powers of 5.

Edited by psychic_mind
Link to comment
Share on other sites

  • 0

however if you are right I know the last non-zero digit

every "set" of 10 multiplies the numbers 1-10 but 10 adds a 0, 1 and the result of 3*7 which is also ends in a 1 doesn't change the last digit, so now we have 4,6,8,9, but now 4*9 ends in 6 and 6*8 ends in 8 so each 'set' of 10 ends in an 8. We also know there are some 1000 'sets' of 10 so all be need to know is what will 8^1000 end in. Well, the last digit of 8*8*8*... cycles 8->4->2->6->8, so 1000 is divisible by 4 so the cycle will on a 6

edit: just saw you posted the same but I think you got 'lucky' because you must pair up and 'even' number

Edited by Doctor Moshe
Link to comment
Share on other sites

  • 0

see my comment inside your spoiler

I was just about to post the very same :lol:.

Doctor Moshe:

Of the numbers 1 to 10000 we both agree that 2000 have factors of 5s. Of these 400 are multiples of 25, containing 2 factors of 5, so we must add 400 more factors of 5 in total. And continue this for higher powers of 5.

yes I agree that 400 are multiples of 25 which contain 2 factors of 5 but didn't you already included 1 of those factors in the 1st count.

Link to comment
Share on other sites

  • 0

see my comment inside your spoiler

Look at a smaller example for 100!. 20 of these are divisible by 5. Dividing by 520 will leave us 1*2*3*4* 1 *6*7*8* 2 *11*12*13...*24* 5 *26*...98*99*20.

As you see there are still 4 more factors of 5 left because the 25s have 2 factors each. So we have to count 4 more which is 100/25. It doesn't matter that I counted them the first time.

Link to comment
Share on other sites

  • 0

The 2500th digit from right to left is actually an even number.

As psychic mind have demonstrated before, there are 2499 trailing zeroes because there are 2499 factors of 5's. However, there are many more factors of 2's, which indicates that the 2500th digit must be even. A closer look at the file in babbagadoosh6's spoiler indicates that the 2500th digit is actually an 8. The cited digit of 9 in the last post is actually the 2503th digit.

Link to comment
Share on other sites

  • 0

So I haven't analyzed your logic entirely, but it looks alright...so let's take the rest of the numbers that we're currently ignoring, we'll have a bunch of these 9*8*7*6*4*3*2*1 which is 72576, so since we're going to be multiplying this a bunch of times, no matter what, the ones digit will stay 6...meaning the 2500th will be 6.

I think one problem with this is that when take out the fives, you can't just throw them away, and they are going to cause trouble later on when you are forced to account for them. For example, when you multiply your 72576 by one of those fives, waiting in the wings, a new trailing zero is created, and the last non-zero digit is no longer 6, it's 8.

Link to comment
Share on other sites

  • 0

At first, I did the same thing as Mordimar’s post (and simlar to some other posts), and got 6 for the last digit,

but then saw some problems with that and couldn’t figure out how to do it that way (still hoping there’s a way to clean that up and make it work).

I think this might be a general way to find last non-zero digit of any factorial:

(should work on any positive integer, with a minor modification in the case that there are more fives than twos)

Use 10,000! for example.

Try looking at the prime factoization of 10,000!

29,995 * 34,996 * 5 2,499 * 71,665etc.

You can take out all the fives and an equal number of twos to get rid of the trailing zeroes.

So, take out 2,499 twos and fives, to get rid of the 2,499 trailing zeroes, leaving:

2 7,496 * 3 4,996 * 50 * 71,665 etc.

(You need to find the last digit of this number.)

You can figure out the last digit of each of those powers, then find the last digit of the product of those (last digits).

And that’s it. You’ll probably want a spreadsheet or program for the big ones.

In more detail:

For example, you can figure out that the last digit of 27,496 is 6.

The last digit of powers of 2 cycle with a period of four: 2,4,8,6…

Since 7,496 is divisible by 4 you’ll get the 4th element of the cycle (which is 6)

I noticed that the last digit of powers of any one-digit number cycle with a period of 1, 2 or 4 (and each period is a factor of 4).

You can make a little cycle table for the last digit of each prime, using 4 columns (since each period is a factor of 4).

Note: the fives are gone since this is a factorial and will have more twos than fives.

You don’t have to worry about ones since they won’t change the last digit.

Prime’s

Last

Digit cycle

2 = 2 4 8 6

3 = 3 9 7 1

7 = 7 9 3 1

9 = 9 1 9 1

To find the last digit of any of the powers, you can divide it’s exponent by 4 to find which element of the cycle

and look at the table to find the last digit. Once you have the last digit of each power, find the last digit of their product.

I tried it with a spreadsheet on 10,000! and got 8 for the last non-zero digit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...