| It's *not* periodic. In the following, LSD(x) denotes the
least-significant non-zero digit of x.
Suppose the LSDs of factorials are periodic, with period p,
so that LSD((N+p)!) = LSD((N+k*p)!), for sufficiently large N.
Let q = p*2^c, so that LSD(p) is not 5. We have:
LSD((q*10^b-1)!) = LSD((2*q*10^b-1)!), and
LSD((q*10^b)!) = LSD((2*q*10^b)!)
But LSD(( q*10^b)!) = (LSD( q ) * LSD(( q*10^b-1)!)) mod 10,
and LSD((2*q*10^b)!) = (LSD(2*q) * LSD((2*q*10^b-1)!)) mod 10,
so that LSD(q) * x = LSD(2*q) * x, modulo 10, where x = 2,4,6 or 8.
However, this implies that LSD(q) = LSD(2*q), modulo 5. (if for
no other reason than the following modulo 10 multiplication table:
1 2 3 4 6 7 8 9
-----------------------
2 4 6 8 2 4 6 8
4 8 2 6 4 8 2 6
6 2 8 4 6 2 8 4
8 6 4 2 8 6 4 2 ).
But LSD(q) = LSD(2*q) modulo 5 gives a contradiction, since we chose q
so that LSD(q) was not 5:
LSD( q ) 1 2 3 4 6 7 8 9
LSD(2*q) 2 4 6 8 2 4 6 8
Thus, the assumption of periodicity must be false.
|
| If the LSD of n! is not periodic, I find it intriguing to see if
there is any obvious way to generating the pattern. Towards this
end, here are the LSD's of 1! through 100000!, using Gilbert's
compaction routine:
1264224288868238682448465318266264448464484672428448463868222428224286626438
6(28,22)886821626444846948462242816(2,13)886829484699(52,23)72428448461626466
26488682(50,25)94846886827(61,14)1(1,25)(76,24)(50,75)(75,25)22428448466
(186,14)(25,25)6(126,14)(265,60)(125,25)33(102,23)(450,15)8868294846(450,26)
(26,24)(400,26)(76,24)(600,50)(450,75)(75,50)(175,25)(100,25)4(226,24)
(100,25)8(76,49)2(176,24)(250,50)(100,25)(225,25)(450,50)(600,50)(250,125)
(125,25)(50,25)(175,25)(150,25)(1125,51)(26,99)(375,51)(676,74)(500,50)
(100,25)(575,25)(250,50)(400,100)(1500,125)(175,25)(550,25)(925,125)(600,50)
(1100,76)(426,74)(400,50)(50,1200)(550,25)(2275,100)(1375,1125)(500,250)
(650,50)(300,950)55(3752,1248)(1500,125)(125,1125)77(5252,123)(1375,1125)
(1000,125)(125,1125)(150,25)(1775,225)(2500,125)(1625,875)(250,26)(26,12474)
(2500,1250)(1250,11250)(3750,50)(10050,1200)(1250,11250)(5000,1250)
(1250,11250)5513(37504,12496)(7500,1250)(1250,11250)(8750,26)(26,12474)
Can anyone find a way to describe the pattern ? (I can't yet.
This isn't a quiz)
/Eric
|