OFFSET
0,5
LINKS
William Boyles, Table of n, a(n) for n = 0..650
FORMULA
a(n) = 2^(n-2) - A055223(n) for n >= 2. - John Keith, Jun 06 2022
EXAMPLE
For n = 4, (2^4)! = 20922789888000, which has a(4) = 3 trailing zeros.
MATHEMATICA
a[n_]:=IntegerExponent[(2^n)!]; Array[a, 38, 0] (* Stefano Spezia, Jun 01 2022 *)
PROG
(Haskell)
seq n = aux (2 ^ n) 0
where
aux x acc
| x < 5 = acc
| otherwise = aux y (acc + y)
where
y = x `div` 5
(PARI) a(n) = val(1<<n, 5)
val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Jun 01 2022
(Python)
from sympy import factorial, multiplicity
def a(n): return multiplicity(5, factorial(2**n, evaluate=False))
print([a(n) for n in range(39)]) # Michael S. Branicky, Jun 01 2022
(Python)
def A354463(n):
c, m = 0, 2**n
while m >= 5:
m //= 5
c += m
return c # Chai Wah Wu, Jun 02 2022
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
William Boyles, May 31 2022
STATUS
approved