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).

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