%I #56 Nov 28 2022 08:11:03
%S 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,
%T 28,29,6,31,32,33,34,7,36,37,38,39,8,41,42,43,44,9,46,47,48,49,2,51,
%U 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
%N Largest divisor of n not divisible by 5.
%C A000265(a(n)) = a(A000265(n)) = A132740(n).
%C a(n) = A060791(n) when n is not divisible by 5. When n is divisible by 5 a(n) divides A060791(n). _Tom Edgar_, Feb 08 2014
%C As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - _Peter Bala_, Feb 21 2019
%H Reinhard Zumkeller, <a href="/A132739/b132739.txt">Table of n, a(n) for n = 1..10000</a>
%H Peter Bala, <a href="/A306367/a306367.pdf">A note on the sequence of numerators of a rational function</a>, 2019.
%F a(n) = n/A060904(n). Dirichlet g.f.: zeta(s-1)*(5^s-5)/(5^s-1). - _R. J. Mathar_, Jul 12 2012
%F a(n) = n/5^A112765(n). See A060904. - _Wolfdieter Lang_, Jun 18 2014
%F From _Peter Bala_, Feb 21 2019: (Start)
%F a(n) = n/gcd(n,5^n).
%F 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,
%F 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.
%F 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)
%F Sum_{k=1..n} a(k) ~ (5/12) * n^2. - _Amiram Eldar_, Nov 28 2022
%e From _Peter Bala_, Feb 21 2019: (Start)
%e 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.
%e 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).
%e 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)).
%e 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) + ....
%e (End)
%t f[n_]:=Denominator[5^n/n];Array[f,100] (* _Vladimir Joseph Stephan Orlovsky_, Feb 16 2011*)
%t Table[n/5^IntegerExponent[n, 5], {n, 100}] (* _Amiram Eldar_, Sep 15 2020 *)
%o (Haskell)
%o a132739 n | r > 0 = n
%o | otherwise = a132739 n' where (n',r) = divMod n 5
%o -- _Reinhard Zumkeller_, Apr 08 2011
%o (PARI) a(n)=n/5^valuation(n, 5) /* _Simon Strandgaard_, Nov 01 2021 */
%o (Ruby) p (1..50).map { |n| n /= 5 while (n % 5) == 0; n } # _Simon Strandgaard_, Nov 01 2021
%o (Python)
%o def A132739(n):
%o a, b = divmod(n, 5)
%o while b == 0:
%o a, b = divmod(a,5)
%o return 5*a+b # _Chai Wah Wu_, Dec 05 2021
%Y Cf. A000265, A038502, A060791, A060904, A112765, A242603.
%K nonn,mult
%O 1,2
%A _Reinhard Zumkeller_, Aug 27 2007