Solve N Factorial Puzzle with 50 Zeros

  • Thread starter Thread starter Lucy Yeats
  • Start date Start date
  • Tags Tags
    Factorial Puzzle
Lucy Yeats
Messages
117
Reaction score
0

Homework Statement



N is divisible by 4. N! has exactly 50 zeros. Find N.

Homework Equations



In case anyone younger doesn't know, Y!=Yx(Y-1)x(Y-2)x(Y-3)x...x3x2x1

The Attempt at a Solution



No idea.
 
Physics news on Phys.org
Lucy Yeats said:

Homework Statement



N is divisible by 4. N! has exactly 50 zeros. Find N.

Homework Equations



In case anyone younger doesn't know, Y!=Yx(Y-1)x(Y-2)x(Y-3)x...x3x2x1

The Attempt at a Solution



No idea.

Maybe try Excel?
 
Yep, Excel works. Not sure how to do it non-numerically...
 
Lucy Yeats said:

Homework Statement



N is divisible by 4. N! has exactly 50 zeros. Find N.

Lucy, is that 50 trailing zeros or 50 zeros in total?

It's pretty easy to work out how many trailing zeros there are in a factorial without actually calculating the full thing, but I don't know how to find the total number of zero digits any other way.
 
uart said:
Lucy, is that 50 trailing zeros or 50 zeros in total?

It's pretty easy to work out how many trailing zeros there are in a factorial without actually calculating the full thing, but I don't know how to find the total number of zero digits any other way.

Interesting point! From my Excel spreadsheet, that does give two different answers...
 
uart said:
Lucy, is that 50 trailing zeros or 50 zeros in total?

It's pretty easy to work out how many trailing zeros there are in a factorial without actually calculating the full thing, but I don't know how to find the total number of zero digits any other way.

I think the problem is asking for the total number of zeros, otherwise it's too easy. However, working out the number of trailing zeros sets the upper bound at 209 (208 with constraint), and a lower bound is obvious at somewhere around 42 (44 with constraint) because there needs to be at least 51 digits to have 50 zeros.

I was able to do a quick estimate of N=129 based on the idea that the upper digits above the trailing zeros should have roughly 1/10 frequency of zeros in it. In other words, 129! has 31 trailing zeros and the remaining 186 digits should have about 19 zeros in it. From there is just a matter of trial and error around that point. And, statistics say that the real answer should not be too far away from that (124, 128 or 132 seems likely), although I'm too lazy to check and find out.

However, I don't know how to solve the problem without at least some numerical verification step. I'd be curious to learn if there is a way, but it seems very difficult.
 
Last edited:
Both.
The teacher said work out n for 50 trailing zeros (which I'm okay with), and n for total zeroes as an 'extension'.
 
berkeman said:
Interesting point! From my Excel spreadsheet, that does give two different answers...

Actually, maybe I'm doing something wrong. I misread the question, and thought it said that N! had to be divisible by 4. Duh, 4 is part of the factorial, so all N! is divisible by 4 for N>=4.

The problem asks for N divisible by 4. And my Excel answer for 50 trailing zeros is not divisible by 4. Hmm. Neither is my Excel answer for 50 zeros total. :frown:
 
Lucy Yeats said:
Both.
The teacher said work out n for 50 trailing zeros (which I'm okay with), and n for total zeroes as an 'extension'.

In fact I'm not sure about trailing zeroes either.
 
  • #10
berkeman said:
Actually, maybe I'm doing something wrong. I misread the question, and thought it said that N! had to be divisible by 4. Duh, 4 is part of the factorial, so all N! is divisible by 4 for N>=4.

The problem asks for N divisible by 4. And my Excel answer for 50 trailing zeros is not divisible by 4. Hmm. Neither is my Excel answer for 50 zeros total. :frown:

@berkeman - I don't currently have Excel on my system, but I think it's limited in how many significant digits it will display. For example,

30! = 265252859812191058636308480000000

(I got this from a factorial table on the web.) Does Excel display all those digits when calculating 30!?

@Lucy Yates - Do you know De Polignac's Formula?
 
  • #11
Yes, I think Excel is doing okay. I went up through about 54!, and it seems to be calculating things okay. Guess I may go back and do a couple sanity checks, though.
 
  • #12
berkeman said:
Yes, I think Excel is doing okay. I went up through about 54!, and it seems to be calculating things okay. Guess I may go back and do a couple sanity checks, though.

Please double check this. I'd be very surprised if Excel is not just using double precision math that is limited to about 15 significant figures. I believe that Petek is correct. Did you check all the digits he posted for (30!) ? There are 26 digits above the trailing zeros.
 
Back
Top