login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A038502 Remove 3's from n. 48

%I #59 Mar 13 2024 08:29:58

%S 1,2,1,4,5,2,7,8,1,10,11,4,13,14,5,16,17,2,19,20,7,22,23,8,25,26,1,28,

%T 29,10,31,32,11,34,35,4,37,38,13,40,41,14,43,44,5,46,47,16,49,50,17,

%U 52,53,2,55,56,19,58,59,20,61,62,7,64,65,22,67,68,23,70,71,8,73,74,25,76

%N Remove 3's from n.

%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

%C The largest divisor of n not divisible by 3. - _Amiram Eldar_, Sep 15 2020

%H Reinhard Zumkeller, <a href="/A038502/b038502.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>.

%F Multiplicative with a(p^e) = 1 if p = 3, otherwise p^e. - _Mitch Harris_, Apr 19 2005

%F a(0) = 0, a(3*n) = a(n), a(3*n+1) = 3*n+1, a(3*n+2) = 3*n+2.

%F Dirichlet g.f. zeta(s-1)*(3^s-3)/(3^s-1). - _R. J. Mathar_, Feb 11 2011

%F From _Peter Bala_, Feb 21 2019: (Start)

%F a(n) = n/gcd(n,3^n).

%F O.g.f.: F(x) - 2*F(x^3) - 2*F(x^9) - 2*F(x^27) - ..., 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) - (3^m - 1)( F(m,x^3) + F(m,x^9) + F(m,x^27) + ... ), 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) ~ (3/8) * n^2. - _Amiram Eldar_, Oct 29 2022

%F a(n) = n / A038500(n). - _R. J. Mathar_, Mar 13 2024

%e From _Peter Bala_, Feb 21 2019: (Start)

%e Sum_{n >= 1} n*a(n)*x^n = G(x) - (2*3)*G(x^3) - (2*9)*G(x^9) - (2*27)*G(x^27) - ..., where G(x) = x*(1 + x)/(1 - x)^3.

%e Sum_{n >= 1} (1/n)*a(n)*x^n = H(x) - (2/3)*H(x^3) - (2/9)*H(x^9) - (2/27)*H(x^27) - ..., where H(x) = x/(1 - x).

%e Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (2/3^2)*L(x^3) - (2/9^2)*L(x^9) - (2/27^2)*L(x^27) - ..., where L(x) = Log(1/(1 - x)).

%e Also, Sum_{n >= 1} 1/a(n)*x^n = L(x) + (2/3)*L(x^3) + (2/3)*L(x^9) + (2/3)*L(x^27) + ... .

%e (End)

%t f[n_] := Times @@ (First@#^Last@# & /@ Select[ FactorInteger@n, First@# != 3 &]); Array[f, 76] (* _Robert G. Wilson v_, Jul 31 2006 *)

%t Table[n/3^IntegerExponent[n, 3], {n, 100}] (* _Amiram Eldar_, Sep 15 2020 *)

%o (PARI) a(n)=if(n<1, 0, n/3^valuation(n,3)) /* _Michael Somos_, Nov 10 2005 */

%o (Haskell)

%o a038502 n = if m > 0 then n else a038502 n' where (n', m) = divMod n 3

%o -- _Reinhard Zumkeller_, Jan 03 2011

%o (Magma) [n/3^Valuation(n,3): n in [1..80]]; // _Bruno Berselli_, May 21 2013

%Y Cf. A007949, A038500, A065330.

%Y Result of iterative removal of other factors: A000265 (2), A065883 (4), A132739 (5), A244414 (6), A242603 (7), A004151 (10).

%K nonn,easy,mult

%O 1,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:09 EDT 2024. Contains 371922 sequences. (Running on oeis4.)