Two forces are acting on the chain: the force of gravity of the hanging part and the force of friction between the table and the part of the chain lying on the table. When length l1 of chain hangs down the force of static friction balancing the weight of this length has its maximum value. Let the mass of unit length of the chain be m (m=m/l) and the coefficient of static friction be k, i.e. the ratio of the greatest value for the force of static friction to the normal pressure. Then the fact that the forces are equal gives us that
mgl1=kmg(l−l1)=0k=l−l1l1