%I #61 Sep 07 2020 06:28:56
%S 1,2,3,4,5,6,7,1,9,10,11,12,13,14,15,2,17,18,19,20,21,22,23,3,25,26,1,
%T 28,29,30,31,4,33,34,35,36,37,38,39,5,41,42,43,44,45,46,47,6,49,50,51,
%U 52,53,2,55,7,57,58,59,60,61,62,63,1,65,66,67,68,69,70,71,9,73,74,75
%N Cubefree part of n.
%C This is an unusual sequence in the sense that the 83.2% of the integers that belong to A004709 occur infinitely many times, whereas the remaining 16.8% of the integers that belong to A046099 never occur at all. - _Ant King_, Sep 22 2013
%H Amiram Eldar, <a href="/A050985/b050985.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%H Henry Bottomley, <a href="http://fs.gallup.unm.edu/Bottomley-Sm-Mult-Functions.htm">Some Smarandache-type multiplicative sequences</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CubefreePart.html">Cubefree Part</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DirichletGeneratingFunction.html">Dirichlet Generating Function</a>.
%F Multiplicative with p^e -> p^(e mod 3), p prime. - _Reinhard Zumkeller_, Nov 22 2009
%F Dirichlet g.f.: zeta(3s)*zeta(s-1)/zeta(3s-3). - _R. J. Mathar_, Feb 11 2011
%F a(n) = n/A008834(n). - _R. J. Mathar_, Dec 08 2015
%F Sum_{k=1..n} a(k) ~ Pi^6 * n^2 / (1890*Zeta(3)). - _Vaclav Kotesovec_, Feb 08 2019
%p A050985 := proc(n)
%p n/A008834(n) ;
%p end proc:
%p seq(A050985(n),n=1..40) ; # _R. J. Mathar_, Dec 08 2015
%t cf[n_]:=Module[{tr=Transpose[FactorInteger[n]],ex,cb},ex= tr[[2]]- Mod[ tr[[2]],3];cb=Times@@(First[#]^Last[#]&/@Transpose[{tr[[1]], ex}]);n/cb]; Array[cf,75] (* _Harvey P. Dale_, Jun 03 2012 *)
%t f[p_, e_] := p^Mod[e, 3]; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, Sep 07 2020 *)
%o (Python)
%o from operator import mul
%o from functools import reduce
%o from sympy import factorint
%o def A050985(n):
%o return 1 if n <=1 else reduce(mul,[p**(e % 3) for p,e in factorint(n).items()])
%o # _Chai Wah Wu_, Feb 04 2015
%o (PARI) a(n) = my(f=factor(n)); f[,2] = apply(x->(x % 3), f[,2]); factorback(f); \\ _Michel Marcus_, Jan 06 2019
%Y Cf. A007913, A008834, A053165, A004709, A046099, A301596, A301597.
%K nonn,easy,mult
%O 1,2
%A _Eric W. Weisstein_, Dec 11 1999