%I #59 Aug 08 2024 21:09:22
%S 1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,27,1,1,1,1,8,1,1,
%T 1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,27,1,8,1,1,1,1,1,1,1,64,1,1,1,
%U 1,1,1,1,8,1,1,1,1,1,1,1,8,27
%N Largest cube dividing n.
%H Harvey P. Dale, <a href="/A008834/b008834.txt">Table of n, a(n) for n = 1..1000</a>
%H Henry Bottomley, <a href="http://fs.gallup.unm.edu/Bottomley-Sm-Mult-Functions.htm">Some Smarandache-type multiplicative sequences</a>.
%H Vaclav Kotesovec, <a href="/A008834/a008834.jpg">Graph - the asymptotic ratio</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CubicPart.html">Cubic Part</a>.
%F Multiplicative with a(p^e) = p^(3[e/3]). - _Mitch Harris_, Apr 19 2005
%F a(n) = A053150(n)^3. - _R. J. Mathar_, May 27 2011
%F Dirichlet g.f.: zeta(s)*zeta(3s-3)/zeta(3s). The Dirichlet convolution of this sequence with A050985 generates A000203. - _R. J. Mathar_, Apr 05 2011
%F Sum_{k=1..n} a(k) ~ 45 * zeta(4/3) * n^(4/3) / (2*Pi^4). - _Vaclav Kotesovec_, Jan 31 2019
%F a(n) = n/A050985(n). - _Amiram Eldar_, Aug 15 2023
%p with(numtheory): [ seq( expand(nthpow(i,3)),i=1..200) ];
%p # alternative:
%p A008834 := proc(n)
%p local p;
%p a := 1 ;
%p for p in ifactors(n)[2] do
%p e := floor(op(2,p)/3) ;
%p a := a*op(1,p)^(3*e) ;
%p end do:
%p a ;
%p end proc:
%p seq(A008834(n),n=1..40) ; # _R. J. Mathar_, Dec 08 2015
%t a[n_] := Times @@ (#[[1]]^(#[[2]] - Mod[#[[2]], 3]) & ) /@ FactorInteger[n]; Table[a[n], {n, 1, 81}]
%t (* _Jean-François Alcover_, Jul 31 2011, after PARI prog. *)
%t upto=1000;Flatten[With[{c=Range[Floor[Surd[upto,3]],1,-1]^3}, Table[ Select[ c,Divisible[n,#]&,1],{n,upto}]]](* _Harvey P. Dale_, Apr 07 2013 *)
%o (PARI) a(n)=n=factor(n);prod(i=1,#n[,1],n[i,1]^(n[i,2]\3*3)) \\ _Charles R Greathouse IV_, Jul 28 2011
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A008834(n): return prod(p**(e-e%3) for p, e in factorint(n).items()) # _Chai Wah Wu_, Aug 08 2024
%Y Cf. A000203, A050985, A053150.
%K nonn,easy,mult
%O 1,8
%A _N. J. A. Sloane_