A132739 Largest divisor of n not divisible by 5.
1, 2, 3, 4, 1, 6, 7, 8, 9, 2, 11, 12, 13, 14, 3, 16, 17, 18, 19, 4, 21, 22, 23, 24, 1, 26, 27, 28, 29, 6, 31, 32, 33, 34, 7, 36, 37, 38, 39, 8, 41, 42, 43, 44, 9, 46, 47, 48, 49, 2, 51, 52, 53, 54, 11, 56, 57, 58, 59, 12, 61, 62, 63, 64, 13, 66, 67, 68, 69, 14, 71, 72, 73, 74, 3, 76, 77
Offset: 1
Examples
From _Peter Bala_, Feb 21 2019: (Start) Sum_{n >= 1} n*a(n)*x^n = G(x) - (4*5)*G(x^5) - (4*25)*G(x^25) - (4*125)*G(x^125) - ..., where G(x) = x*(1 + x)/(1 - x)^3. Sum_{n >= 1} (1/n)*a(n)*x^n = H(x) - (4/5)*H(x^5) - (4/25)*H(x^25) - (4/125)*H(x^125) - ..., where H(x) = x/(1 - x). Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (4/5^2)*L(x^5) - (4/25^2)*L(x^25) - (4/125^2)*L(x^125) - ..., where L(x) = Log(1/(1 - x)). Also, Sum_{n >= 1} 1/a(n)*x^n = L(x) + (4/5)*L(x^5) + (4/5)*L(x^25) + (4/5)*L(x^125) + .... (End)
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Peter Bala, A note on the sequence of numerators of a rational function, 2019.
Programs
-
Haskell
a132739 n | r > 0 = n | otherwise = a132739 n' where (n',r) = divMod n 5 -- Reinhard Zumkeller, Apr 08 2011
-
Mathematica
f[n_]:=Denominator[5^n/n];Array[f,100] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2011*) Table[n/5^IntegerExponent[n, 5], {n, 100}] (* Amiram Eldar, Sep 15 2020 *)
-
PARI
a(n)=n/5^valuation(n, 5) /* Simon Strandgaard, Nov 01 2021 */
-
Python
def A132739(n): a, b = divmod(n, 5) while b == 0: a, b = divmod(a,5) return 5*a+b # Chai Wah Wu, Dec 05 2021
-
Ruby
p (1..50).map { |n| n /= 5 while (n % 5) == 0; n } # Simon Strandgaard, Nov 01 2021
Formula
a(n) = n/A060904(n). Dirichlet g.f.: zeta(s-1)*(5^s-5)/(5^s-1). - R. J. Mathar, Jul 12 2012
From Peter Bala, Feb 21 2019: (Start)
a(n) = n/gcd(n,5^n).
O.g.f.: F(x) - 4*F(x^5) - 4*F(x^25) - 4*F(x^125) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers. More generally, for m >= 1,
Sum_{n >= 0} a(n)^m*x^n = F(m,x) - (5^m - 1)(F(m,x^5) + F(m,x^25) + F(m,x^125) + ...), where F(m,x) = A(m,x)/(1 - x)^(m+1) with A(m,x) the m_th Eulerian polynomial: A(1,x) = x, A(2,x) = x*(1 + x), A(3,x) = x*(1 + 4*x + x^2) - see A008292.
Repeatedly applying the Euler operator x*d/dx or its inverse operator to the o.g.f. for the sequence produces generating functions for the sequences n^m*a(n), m in Z. Some examples are given below. (End)
Sum_{k=1..n} a(k) ~ (5/12) * n^2. - Amiram Eldar, Nov 28 2022
Comments