A060904 Largest power of 5 that divides n.
1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1
Offset: 1
Examples
a(10) = 5 because 10 = 5 * 2.
References
- Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Tyler Ball, Tom Edgar, and Daniel Juda, Dominance Orders, Generalized Binomial Coefficients, and Kummer's Theorem, Mathematics Magazine, Vol. 87, No. 2, April 2014, pp. 135-143.
Crossrefs
Programs
-
Magma
[5^Valuation(n,5): n in [1..100]]; // Vincenzo Librandi, Dec 29 2015
-
Maple
A060904 := n -> 5^padic[ordp](n,5): # Peter Luschny, Nov 26 2010
-
Mathematica
Table[5^IntegerExponent[n, 5], {n, 100}] (* Vincenzo Librandi, Dec 29 2015 *)
-
PARI
a(n)=5^valuation(n,5) \\ Charles R Greathouse IV, Aug 05 2015
-
Sage
[5^valuation(i,5) for i in [1..100]] # Tom Edgar, Mar 22 2014
Formula
If n is not divisible by 5, then a(n) = 1. If n = 5^k * m where m is not divisible by 5, then a(n) = 5^k.
Dirichlet g.f.: zeta(s)*(5^s-1)/(5^s-5). - R. J. Mathar, Jul 12 2012
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,5^n).
a(n) = n/A132739(n).
O.g.f.: x/(1 - x) + 4*Sum_{n >= 1} 5^(n-1)*x^(5^n)/ (1 - x^(5^n)). (End).
a(n) = (1/5)*(sigma(5*n) - sigma(n))/(sigma(5*n) - 5*sigma(n)), where sigma(n) = A000203(n). - Peter Bala, Jun 10 2022
Sum_{k=1..n} a(k) ~ (4/(5*log(5)))*n*log(n) + (3/5 + 4*(gamma-1)/(5*log(5)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), May 07 2001
Edited by Joerg Arndt and M. F. Hasler, Dec 29 2015
Comments