A191610 Possible number of trailing zeros in k!.
0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 93, 94, 95, 96, 97, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 117, 118, 119, 120, 121, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 136
Offset: 1
Keywords
Examples
3 is a term because 15! = 1307674368000 has 3 trailing 0's. 5 is not a term because 24! has 4 trailing 0's, but 25! has 6 trailing 0's.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Haskell
a191610 1 = 0 a191610 n = sum $ takeWhile (> 0) $ map ((n - 1) `div`) a000351_list -- Reinhard Zumkeller, Oct 31 2012
-
Mathematica
zOF[n_Integer?Positive]:=Module[{maxpow=0},While[5^maxpow<=n,maxpow++];Plus@@Table[ Quotient[n,5^i],{i,maxpow-1}]]; Attributes[zOF]={Listable}; zOF[Range[1000]]//Union (* Harvey P. Dale, Dec 06 2023 *) Table[Sum[Floor[(n - 1)/5^k], {k, 0, Floor[Log[5, n]]}], {n, 1, 200}] (* Clark Kimberling, Feb 17 2025 *)
-
Python
# requires Python 3.2 and higher from itertools import accumulate from sympy import multiplicity A191610 = [0]+list(accumulate(multiplicity(5,n) for n in range(5,10**3,5))) # Chai Wah Wu, Sep 05 2014
Formula
a(n) ~ 5*n/4. - Vaclav Kotesovec, Sep 21 2020
G.f.: 1/(1-x) * Sum_{k>=0} x^(5^k)/(1-x^5^k). - Joerg Arndt, Sep 21 2020
a(n) = Sum_{k>=0} floor((n-1)/5^k). - Clark Kimberling, Feb 17 2025
Comments