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.

A246839 Number of trailing zeros in A002109(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 15, 15, 15, 15, 15, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100, 130, 130, 130, 130, 130, 165, 165, 165, 165, 165, 205, 205, 205, 205, 205, 250, 250, 250, 250, 250, 350, 350, 350, 350, 350, 405, 405, 405, 405
Offset: 0

Views

Author

Chai Wah Wu, Sep 04 2014

Keywords

Crossrefs

Programs

  • Mathematica
    (n=#;k=0;While[Mod[n,10]==0,n=n/10;k++];k)&/@Hyperfactorial@Range[0,60] (* Giorgos Kalogeropoulos, Sep 14 2021 *)
  • PARI
    a(n) = sum(i=1, n, i*valuation(i, 5)); \\ Michel Marcus, Sep 14 2021
  • Python
    def a(n):
      s = 1
      for k in range(n+1):
        s *= k**k
      i = 1
      while not s % 10**i:
        i += 1
      return i-1
    n = 1
    while n < 100:
      print(a(n),end=', ')
      n += 1 # Derek Orr, Sep 04 2014
    
  • Python
    from sympy import multiplicity
    A246839, p5 = [0,0,0,0,0], 0
    for n in range(5,10**3,5):
        p5 += multiplicity(5,n)*n
        A246839.extend([p5]*5)
    # Chai Wah Wu, Sep 05 2014
    

Formula

From Michel Marcus, Sep 14 2021: (Start)
a(n) = A122840(A002109(n)), but also,
a(n) = A112765(A002109(n)), see explanation in A002109; so
a(n) = Sum_{i=1..n} i*v_5(i), where v_5(i) = A112765(i) is the exponent of the highest power of 5 dividing i. After a similar formula in A249152. (End)