login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000966 n! never ends in this many 0's.
(Formerly M3808 N1557)
17
5, 11, 17, 23, 29, 30, 36, 42, 48, 54, 60, 61, 67, 73, 79, 85, 91, 92, 98, 104, 110, 116, 122, 123, 129, 135, 141, 147, 153, 154, 155, 161, 167, 173, 179, 185, 186, 192, 198, 204, 210, 216, 217, 223, 229, 235, 241, 247, 248, 254, 260, 266, 272, 278, 279, 285 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence also holds for bases 5, 15, 20, 30, 40, 60 and 120. These bases (together with 10) are the proper divisors of 5! that are divisible by 5. - Carl R. White, Jan 21 2008
The g.f. conjectured by Simon Plouffe in 1992 dissertation is not correct; the first discrepancy is a(31) = 155, his g.f. gives 160. In fact, the g.f. for this sequence is not rational; the first differences are bounded but not periodic. - Franklin T. Adams-Watters, Jul 03 2009
a(n+1) - a(n) = 1 or 6: Let k be the smallest number such that (5*k)! ends in at least a(n)+1 zeros, then k is a multiple of 5, otherwise (5*(k-1))! would end in at least a(n) zeros, either contradicting with the minimality of k or with the fact that a(n) is a term. If (5*k)! ends in exactly a(n)+1 zeros, then the next term after a(n) is a(n)+6, otherwise it is a(n)+1. - Jianing Song, Apr 13 2022
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 42
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
Gerald Hillier, Program for HP 49G calculator, MoHPC: The Museum of HP Calculators, Sep 29 2017.
L. Moser, Problem 158, Math. Mag., 27 (1953), 54-55. Solution by C. W. Trigg.
L. Moser and C. W. Trigg, Problem 158 (annotated and scanned copy)
A. M. Oller-Marcen and J. Maria Grau, On the Base-b Expansion of the Number of Trailing Zeros of b^k!, J. Int. Seq. 14 (2011) 11.6.8.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
N. J. A. Sloane, Transforms
FORMULA
The simplest way to obtain this sequence is by constructing a power series A(x) = Sum_{k >= 1} x^a(k) whose exponents give the terms of the sequence. Define e(n) = (5^n-1)/4, f(n) = (1-x^(e(n)-1))/(1-x^e(n-1)), t(n) = x^(e(n)-6).
Now use the recurrence A[2] = 1 and for n >= 3, A[n] = f(n)*A[n-1]+t(n); then A = limit_{n->infinity} x^5*A[n]. This follows easily from the explicit formula for A027868(n). Here is the beginning of A: x^5 + x^11 + x^17 + x^23 + x^29 + x^30 + x^36 + x^42 + x^48 + ... - N. J. A. Sloane, Feb 02 2007
Formula from C. W. Trigg (see the Moser reference): All terms can be described as follows: for k = 1, 2, 3, ..., the number 6k-1 + floor(k/5) + floor(k/5^2) + floor(k/5^3) + ... is a term together with A112765(k) preceding numbers. [corrected and simplified by Gerald Hillier and Andrey Zabolotskiy, Sep 13 2017]
EXAMPLE
17 is in the sequence because on passing from 74! to 75!, the number of end zeros jumps from 16 to 18, skipping 17.
More generally, we have:
n, n!
-----
0, 1
1, 1
2, 2
3, 6
4, 24
5, 120
6, 720
7, 5040
8, 40320
9, 362880
10, 3628800
11, 39916800
12, 479001600
13, 6227020800
14, 87178291200
15, 1307674368000
16, 20922789888000
17, 355687428096000
18, 6402373705728000
19, 121645100408832000
20, 2432902008176640000
21, 51090942171709440000
22, 1124000727777607680000
23, 25852016738884976640000
24, 620448401733239439360000
25, 15511210043330985984000000 <- jump from 4 to 6 trailing 0's, so 5 is a term
26, 403291461126605635584000000
27, 10888869450418352160768000000
28, 304888344611713860501504000000
29, 8841761993739701954543616000000
30, 265252859812191058636308480000000
etc.
MAPLE
read(transforms); e:=n->(5^n-1)/4; f:=n->(1-x^(e(n)-1))/(1-x^e(n-1)); t:=n->x^(e(n)-6); A[2]:=1; for n from 3 to 8 do A[n]:=f(n)*A[n-1]+t(n); od: POWERS(series(x^5*A[8], x, 5005), x, 5005); # N. J. A. Sloane, Feb 02 2007
MATHEMATICA
u=Union[FoldList[Plus, 0, IntegerExponent[Range[1000], 5]]]; Complement[Range[u[[ -1]]], u] (* T. D. Noe, Feb 02 2007 *)
zOF[n_Integer?Positive]:=Module[{maxpow=0}, While[5^maxpow<=n, maxpow++]; Plus@@Table[Quotient[n, 5^i], {i, maxpow-1}]]; Attributes[ zOF] = {Listable}; nmz[n_]:=Module[{zs=zOF[Range[n]]}, Complement[ Range[ Max[zs]], zs]]; nmz[2000] (* Harvey P. Dale, Mar 05 2017 *)
PROG
(PARI) valp(n, p)=my(s); while(n\=p, s+=n); s
is(n)=my(t=(4*n-1)\5*5+5, s=valp(t, 5)-n); while(s<0, s+=valuation(t+=5, 5)); s>0 \\ Charles R Greathouse IV, Sep 22 2016
(Python)
from itertools import count, islice
def val(n, p):
e = 0
while n%p == 0: n //= p; e += 1
return e
def agen(): # generator of terms
fi, nz, z = 1, 0, 0
for i in count(1):
fi *= 2**val(i, 2) * 5**val(i, 5)
z = val(fi, 10)
for k in range(nz+1, nz+z): yield k
nz += z
fi //= 10**z
print(list(islice(agen(), 56))) # Michael S. Branicky, Apr 13 2022
CROSSREFS
Cf. A000142, A027868, A080066 (first differences), A191610 (complement), A096346 (same for base 3), A055938 (same for base 2), A136767-A136774.
Sequence in context: A333656 A043389 A277571 * A031480 A070753 A038939
KEYWORD
nonn,base,nice
AUTHOR
EXTENSIONS
More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 24 2003
Corrected by Sascha Kurz, Jan 27 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)