Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Aug 12 2024 16:35:38
%S 0,1,1,2,1,1,1,2,1,1,2,1,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,1,1,1,2,1,1,1,
%T 1,1,1,2,2,1,1,2,2,1,2,1,1,1,1,1,2,1,1,2,1,1,1,2,1,1,1,1,1,2,2,1,1,1,
%U 1,1,2,1,1,1,1,2,1,2,1,1,1,1,2,2,2,1,1
%N The maximal exponent in the prime factorization of the cubefree numbers.
%C The asymptotic density of occurrences of 1 is zeta(3)/zeta(2) = 0.730762... (A253905), and the asymptotic density of occurrences of 2 is 1 - zeta(3)/zeta(2) = 0.269237... .
%H Amiram Eldar, <a href="/A368712/b368712.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A051903(A004709(n)).
%F a(n) = 2 - A008966(A004709(n)) for n >= 2.
%F Except for n = 1, a(n) = 1 or 2.
%F a(n) = 1 if and only if A004709(n) is squarefree (A005117).
%F a(n) = 2 if and only if A004709(n) > 1 and is nonsquarefree (A013929), i.e., A004709(n) is in A067259.
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 - zeta(3)/zeta(2) = 2 - A253905 = 1.269237030598... .
%t s[n_] := If[n == 1, 0, Max @@ Last /@ FactorInteger[n]]; s /@ Select[Range[100], Max[FactorInteger[#][[;; , 2]]] < 3 &]
%t (* or *)
%t f[n_] := Module[{e = Max @@ FactorInteger[n][[;; , 2]]}, If[e < 3, e, Nothing]]; f[1] = 0; Array[f, 100]
%o (PARI) lista(kmax) = {my(e); print1(0, ", "); for(k = 2, kmax, e = vecmax(factor(k)[,2]); if(e < 3, print1(e, ", ")));}
%o (Python)
%o from sympy import mobius, integer_nthroot, factorint
%o def A368712(n):
%o def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1))
%o m, k = n, f(n)
%o while m != k:
%o m, k = k, f(k)
%o return max(factorint(m).values(),default=0) # _Chai Wah Wu_, Aug 12 2024
%Y Cf. A004709, A005117, A008966, A013929, A033150, A051903, A067259.
%Y Cf. A002117, A013661, A253905.
%Y Similar sequences: A368710, A368711, A368713.
%K nonn,easy
%O 1,4
%A _Amiram Eldar_, Jan 04 2024