%I #27 Sep 16 2021 02:41:47
%S 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,
%T 100,100,100,100,130,130,130,130,130,165,165,165,165,165,205,205,205,
%U 205,205,250,250,250,250,250,350,350,350,350,350,405,405,405,405
%N Number of trailing zeros in A002109(n).
%H Chai Wah Wu, <a href="/A246839/b246839.txt">Table of n, a(n) for n = 0..999</a>
%F From _Michel Marcus_, Sep 14 2021: (Start)
%F a(n) = A122840(A002109(n)), but also,
%F a(n) = A112765(A002109(n)), see explanation in A002109; so
%F 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)
%t (n=#;k=0;While[Mod[n,10]==0,n=n/10;k++];k)&/@Hyperfactorial@Range[0,60] (* _Giorgos Kalogeropoulos_, Sep 14 2021 *)
%o (Python)
%o def a(n):
%o ..s = 1
%o ..for k in range(n+1):
%o ....s *= k**k
%o ..i = 1
%o ..while not s % 10**i:
%o ....i += 1
%o ..return i-1
%o n = 1
%o while n < 100:
%o ..print(a(n),end=', ')
%o ..n += 1 # _Derek Orr_, Sep 04 2014
%o (Python)
%o from sympy import multiplicity
%o A246839, p5 = [0,0,0,0,0], 0
%o for n in range(5,10**3,5):
%o ....p5 += multiplicity(5,n)*n
%o ....A246839.extend([p5]*5)
%o # _Chai Wah Wu_, Sep 05 2014
%o (PARI) a(n) = sum(i=1, n, i*valuation(i, 5)); \\ _Michel Marcus_, Sep 14 2021
%Y Cf. A002109, A112765, A122840, A246817, A027868, A249152.
%K nonn,base
%O 0,6
%A _Chai Wah Wu_, Sep 04 2014