cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A173228 The number of trailing zeros in (10^n)!

Original entry on oeis.org

2, 24, 249, 2499, 24999, 249998, 2499999, 24999999, 249999998, 2499999997, 24999999997, 249999999997, 2499999999997, 24999999999998, 249999999999997, 2499999999999996, 24999999999999995, 249999999999999995, 2499999999999999995, 24999999999999999996
Offset: 1

Views

Author

Keywords

Comments

For n > 1, the number a(n) of trailing end 0's in (10^n)! is short of (10^n)/4 by A055223(n). - Lekraj Beedassy, Oct 27 2010

Programs

  • Mathematica
    a[n_] := Sum[Floor[10^n/5^i], {i, Floor[Log[5, 10^n]]}]; Array[f, 18] (* edited by Robert G. Wilson v, Jul 22 2012 *)
  • Python
    from math import log, ceil
    def a(n):
      return sum(10**n // 5**k for k in range(1, ceil(log(10, 5) * n)))
    # Stephen G Cappella, Dec 13 2017

Formula

a(n) = Sum_{k>=1} floor(10^n/5^k). - Stephen G Cappella, Dec 13 2017

A354463 a(n) is the number of trailing zeros in (2^n)!.

Original entry on oeis.org

0, 0, 0, 1, 3, 7, 14, 31, 63, 126, 253, 509, 1021, 2045, 4094, 8189, 16380, 32763, 65531, 131067, 262140, 524285, 1048571, 2097146, 4194297, 8388603, 16777208, 33554424, 67108858, 134217720, 268435446, 536870902, 1073741816, 2147483642, 4294967289, 8589934584, 17179869176, 34359738358, 68719476729
Offset: 0

Views

Author

William Boyles, May 31 2022

Keywords

Examples

			For n = 4, (2^4)! = 20922789888000, which has a(4) = 3 trailing zeros.
		

Crossrefs

Programs

  • Haskell
    seq n = aux (2 ^ n) 0
      where
        aux x acc
          | x < 5 = acc
          | otherwise = aux y (acc + y)
          where
            y = x `div` 5
    
  • Mathematica
    a[n_]:=IntegerExponent[(2^n)!]; Array[a,38,0] (* Stefano Spezia, Jun 01 2022 *)
  • PARI
    a(n) = val(1<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

Formula

a(n) = A027868(A000079(n)). - Michel Marcus, Jun 01 2022
a(n) = 2^(n-2) - A055223(n) for n >= 2. - John Keith, Jun 06 2022

A174807 Floor(10^n/4) - A173228(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 2, 3, 3, 3, 3, 2, 3, 4, 5, 5, 5, 4, 3, 5, 6, 7, 5, 8, 8, 6, 8, 10, 10, 8, 6, 7, 8, 8, 10, 7, 9, 9, 10, 11, 10, 9, 10, 9, 11, 11, 11, 11, 12, 13, 13, 12, 14, 10, 14, 17, 15, 13, 13, 12, 15, 14, 16, 15, 12, 14, 15, 15, 16, 15, 15, 15, 16, 13, 12, 16, 17, 14, 20, 20, 20
Offset: 1

Views

Author

Keywords

Comments

a(n) = A055223(n) if n>1.
Showing 1-3 of 3 results.