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.
%I A112765 #91 Jun 27 2025 10:13:11 %S A112765 0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,1,0,0,0,0, %T A112765 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0, %U A112765 0,1,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,1 %N A112765 Exponent of highest power of 5 dividing n. Or, 5-adic valuation of n. %C A112765 A027868 gives partial sums. %C A112765 This is also the 5-adic valuation of Fibonacci(n). See Lengyel link. - _Michel Marcus_, May 06 2017 %H A112765 Reinhard Zumkeller, <a href="/A112765/b112765.txt">Table of n, a(n) for n = 1..10000</a> %H A112765 Dario T. de Castro, <a href="http://math.colgate.edu/~integers/w61/w61.pdf">P-adic Order of Positive Integers via Binomial Coefficients</a>, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 22, Paper A61, 2022. %H A112765 T. Lengyel, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/33-3/lengyel.pdf">The order of the Fibonacci and Lucas numbers</a>, Fibonacci Quart. 33 (1995), no. 3, 234-239. See Lemma 1 p. 235. %F A112765 Totally additive with a(p) = 1 if p = 5, 0 otherwise. %F A112765 From _Hieronymus Fischer_, Jun 08 2012: (Start) %F A112765 With m = floor(log_5(n)), frac(x) = x-floor(x): %F A112765 a(n) = Sum_{j=1..m} (1 - ceiling(frac(n/5^j))). %F A112765 a(n) = m + Sum_{j=1..m} (floor(-frac(n/5^j))). %F A112765 a(n) = A027868(n) - A027868(n-1). %F A112765 G.f.: Sum_{j>0} x^5^j/(1-x^5^j). (End) %F A112765 a(5n) = A055457(n). - _R. J. Mathar_, Jul 17 2012 %F A112765 Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/4. - _Amiram Eldar_, Feb 14 2021 %F A112765 a(n) = 5*Sum_{j=1..floor(log(n)/log(5))} frac(binomial(n, 5^j)*5^(j-1)/n). - _Dario T. de Castro_, Jul 10 2022 %p A112765 A112765 := proc(n) %p A112765 padic[ordp](n,5) ; %p A112765 end proc: # _R. J. Mathar_, Jul 12 2016 %t A112765 a[n_] := IntegerExponent[n, 5]; Array[a, 105] (* _Jean-François Alcover_, Jan 25 2018 *) %o A112765 (Haskell) %o A112765 a112765 n = fives n 0 where %o A112765 fives n e | r > 0 = e %o A112765 | otherwise = fives n' (e + 1) where (n',r) = divMod n 5 %o A112765 -- _Reinhard Zumkeller_, Apr 08 2011 %o A112765 (PARI) A112765(n)=valuation(n,5); /* _Joerg Arndt_, Apr 08 2011 */ %o A112765 (Python) %o A112765 def a(n): %o A112765 k = 0 %o A112765 while n > 0 and n%5 == 0: n //= 5; k += 1 %o A112765 return k %o A112765 print([a(n) for n in range(1, 106)]) # _Michael S. Branicky_, Aug 06 2021 %Y A112765 Cf. A007814, A007949, A112762, A022337, A122840, A027868, A054899, A122841, A160093, A160094, A196563, A196564. %Y A112765 Cf. A343251, A000351 (positions of records, greedy inverse). %K A112765 nonn,easy %O A112765 1,25 %A A112765 _Reinhard Zumkeller_, Sep 18 2005