login
Least positive integer k for which 5^n divides k!.
7

%I #32 Jan 03 2020 05:28:55

%S 1,5,10,15,20,25,25,30,35,40,45,50,50,55,60,65,70,75,75,80,85,90,95,

%T 100,100,105,110,115,120,125,125,125,130,135,140,145,150,150,155,160,

%U 165,170,175,175,180,185,190,195,200,200,205,210,215,220,225,225,230,235,240,245

%N Least positive integer k for which 5^n divides k!.

%C Also the smallest factorial having at least n trailing zeros. - _Jud McCranie_, Oct 05 2010

%C a(n) ~ 4n, a(n) > 4n. Every positive multiple of 5 occurs as much as the exponent of 5 in the prime factorization. - _David A. Corneth_, Jul 12 2016

%C Least k such that A027868(k) >= n. - _Robert Israel_, Jul 12 2016

%C See A007843 and A007844 for the analog for 2 and 3 instead of 5. - _M. F. Hasler_, Dec 27 2019

%D H. Ibstedt, Smarandache Primitive Numbers, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 216-229.

%H T. D. Noe, <a href="/A007845/b007845.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = 5*A228297(n) for n > 0: see A007843. - _M. F. Hasler_, Dec 27 2019

%p 1, seq(t $ padic:-ordp(t,5), t=5..1000, 5); # _Robert Israel_, Jul 12 2016

%t lpi[n_]:=Module[{k=1,n5=5^n},While[!Divisible[k!,n5],k++];k]; Array[ lpi,60,0] (* _Harvey P. Dale_, Jun 19 2012 *)

%o (PARI) a(n) = {k = 1; while (valuation(k!, 5) < n, k++); k;} \\ _Michel Marcus_, Aug 19 2013

%o (PARI) a(n) = {my(ck = 4 * n, k = 5 * floor(ck/5), t = 0); if(ck > 0, t = sum(i = 1, logint(ck,5),ck\=5)); while(t < n, k+=5; t+=valuation(k,5));max(1,k)} \\ _David A. Corneth_, Jul 12 2016

%Y Cf. A007843, A007844, A027868.

%K nonn

%O 0,2

%A Bruce Dearden and _Jerry Metzger_