[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1151.0. "what strings NEVER appear in n! ?" by HANNAH::OSMAN (see HANNAH::IGLOO$:[OSMAN]ERIC.VT240) Wed Nov 15 1989 14:05

    
    	Prove that every finite string of digits can be found as a
    	substring of some n!.
    
    	OR, provide a string of digits and a proof that the given string
    	does not appear in any n!.
    
    /Eric
    	
T.RTitleUserPersonal
Name
DateLines
1151.1A still more important questionAKQJ10::YARBROUGHI prefer PiWed Nov 15 1989 15:111
Why? :-)
1151.2SCAFFI::XIAIn my beginning is my end.Wed Nov 15 1989 16:365
    re .1,
    I would have to ask the same :-).  To me I don't like problems that
    are base dependent (except a theorem about the normal numbers).
    
    Eugene
1151.3SCAFFI::XIAIn my beginning is my end.Wed Nov 15 1989 16:413
    re .2,
    Come to think of it that theorem is not really base dependent.
    Eugene
1151.4maybe we can prove that rightmost digits will be...HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Nov 28 1989 18:2271
    It might be easier to prove the stronger statement:
    
    	Any given string of digits comprises the rightmost (perhaps minus
    	one digit) of some factorial, not counting the zeroes that
    	necessarily follow it.
    
    For example, looking at the first several:
    
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880
10! = 3628800
11! = 39916800
12! = 479001600
13! = 6227020800
14! = 87178291200
15! = 1307674368000
16! = 20922789888000
17! = 355687428096000
18! = 6402373705728000
19! = 121645100408832000
20! = 2432902008176640000
21! = 51090942171709440000
22! = 1124000727777607680000
23! = 25852016738884976640000
24! = 620448401733239439360000
25! = 15511210043330985984000000
26! = 403291461126605635584000000
27! = 10888869450418352160768000000
28! = 304888344611713860501504000000
29! = 8841761993739701954543616000000
30! = 265252859812191058636308480000000
31! = 8222838654177922817725562880000000
32! = 263130836933693530167218012160000000
33! = 8683317618811886495518194401280000000
34! = 295232799039604140847618609643520000000
35! = 10333147966386144929666651337523200000000
36! = 371993326789901217467999448150835200000000
37! = 13763753091226345046315979581580902400000000
38! = 523022617466601111760007224100074291200000000
39! = 20397882081197443358640281739902897356800000000
40! = 815915283247897734345611269596115894272000000000
41! = 33452526613163807108170062053440751665152000000000
42! = 1405006117752879898543142606244511569936384000000000
43! = 60415263063373835637355132068513997507264512000000000
44! = 2658271574788448768043625811014615890319638528000000000
45! = 119622220865480194561963161495657715064383733760000000000
46! = 5502622159812088949850305428800254892961651752960000000000
47! = 258623241511168180642964355153611979969197632389120000000000
48! = 12413915592536072670862289047373375038521486354677760000000000
49! = 608281864034267560872252163321295376887552831379210240000000000
50! = 30414093201713378043612608166064768844377641568960512000000000000
    
    	The last non-zero digit seems always to be 2,4,6, or 8 (easily
    	provable??).
    
    	But looking at the next two digits before that, we have:
    
    	50,03,28,28,16,01,20,91,36,88,09,72,83...
    
    	Perhaps we can prove that all possible combinations will
    	necessarily be covered.
    
    /Eric
    
1151.5How many '0' has n! ?ZURFCC::FEHLMANNTWed May 09 1990 14:339
    How many zero's has n! ?
    
    It seems not too difficult, because each power of 10 (10^1, 10^2 ..)
    and each combination of factors which yield a multiple of ten adds one.
    This makes it possible to write a program which computes the number,
    but still difficult to give a mathematical formula. Perhaps this is a
    hint for the original problem?
    
    Thomas
1151.6GUESS::DERAMODan D'EramoWed May 09 1990 17:3418
>>    How many zero's has n! ?
>>    
>>    It seems not too difficult, because each power of 10 (10^1, 10^2 ..)
>>    and each combination of factors which yield a multiple of ten adds one.
>>    This makes it possible to write a program which computes the number,
>>    but still difficult to give a mathematical formula. Perhaps this is a
>>    hint for the original problem?
>>    
>>    Thomas

	Each power of ten contributes a trailing zero, but there may
	be other zero's in the decimal expansion that aren't part of
	the trailing zeroes.

	The number of times ten divides evenly into n! should be
	[n/5] + [n/5^2] + [n/5^3] + ... = sum(k=1 to oo) [n/(5^k)].

	Dan
1151.7Zeroes are easy. It's the others...CIVAGE::LYNNLynn Yarbrough WNP DTN 383-5663Wed May 09 1990 17:4510
Since 2's appear much more frequently than 5's, and both are required to add 
a zero at the end, the number of trailing zeroes in n! is

	sum{k=1..inf} [n/5^k],

where [] means "integer part of". So 24! ends in 4 zeroes, 25! Ends in 
5+1=6 zeroes, etc.

Of course, this is irrelevant to the original problem, for which I suspect no
proof exists (Boo! Hisss!).
1151.8Zeroes are hard, the others are easyVMSDEV::HALLYBTwin Peaks Municipal Software WorksWed May 09 1990 18:0423
    I'll help by bounding the series:
    
>	sum{k=1..inf} [n/5^k]
    
    It has the equivalent but finite representation:
    
	sum{k=1..n} [n/5^k]
    
    Even better bounds exist of course but:  Is there a closed form?
    
>                    -< Zeroes are easy. It's the others... >-
    
    Not true!  I have, in closed form, expressions for all the others.
    I can tell you how many trailing 1s there are, how many trailing 2s,
    and so forth.							:-)
    
    For the original problem, perhaps an explicit hunt is in order.
    Anybody so inclined (not me!) might want to whip up the first 1000 or
    so factorials and list the factorials containing digit sequences
    000, 001, 002, 003, ... , 999.  This might give rise to hypotheses,
    like "n is found in sqrt(n+1)!" or whatever.
    
      John