login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A246839
Number of trailing zeros in A002109(n).
3
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,6
LINKS
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)
MATHEMATICA
(n=#; k=0; While[Mod[n, 10]==0, n=n/10; k++]; k)&/@Hyperfactorial@Range[0, 60] (* Giorgos Kalogeropoulos, Sep 14 2021 *)
PROG
(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
(PARI) a(n) = sum(i=1, n, i*valuation(i, 5)); \\ Michel Marcus, Sep 14 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Sep 04 2014
STATUS
approved