In number theory, the Kempner function S ( n ) {\displaystyle S(n)} is defined for a given positive integer n {\displaystyle n} to be the smallest number s {\displaystyle s} such that n {\displaystyle n} divides the factorial s ! {\displaystyle s!} . For example, the number 8 {\displaystyle 8} does not divide 1 ! {\displaystyle 1!} , 2 ! {\displaystyle 2!} , or 3 ! {\displaystyle 3!} , but does divide 4 ! {\displaystyle 4!} , so S ( 8 ) = 4 {\displaystyle S(8)=4} .
This function has the property that it has a highly inconsistent growth rate: it grows linearly on the prime numbers but only grows sublogarithmically at the factorial numbers.