This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A368712 #16 Aug 12 2024 16:35:38 %S A368712 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 A368712 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 A368712 1,1,2,1,1,1,1,2,1,2,1,1,1,1,2,2,2,1,1 %N A368712 The maximal exponent in the prime factorization of the cubefree numbers. %C A368712 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 A368712 Amiram Eldar, <a href="/A368712/b368712.txt">Table of n, a(n) for n = 1..10000</a> %F A368712 a(n) = A051903(A004709(n)). %F A368712 a(n) = 2 - A008966(A004709(n)) for n >= 2. %F A368712 Except for n = 1, a(n) = 1 or 2. %F A368712 a(n) = 1 if and only if A004709(n) is squarefree (A005117). %F A368712 a(n) = 2 if and only if A004709(n) > 1 and is nonsquarefree (A013929), i.e., A004709(n) is in A067259. %F A368712 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 - zeta(3)/zeta(2) = 2 - A253905 = 1.269237030598... . %t A368712 s[n_] := If[n == 1, 0, Max @@ Last /@ FactorInteger[n]]; s /@ Select[Range[100], Max[FactorInteger[#][[;; , 2]]] < 3 &] %t A368712 (* or *) %t A368712 f[n_] := Module[{e = Max @@ FactorInteger[n][[;; , 2]]}, If[e < 3, e, Nothing]]; f[1] = 0; Array[f, 100] %o A368712 (PARI) lista(kmax) = {my(e); print1(0, ", "); for(k = 2, kmax, e = vecmax(factor(k)[,2]); if(e < 3, print1(e, ", ")));} %o A368712 (Python) %o A368712 from sympy import mobius, integer_nthroot, factorint %o A368712 def A368712(n): %o A368712 def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1)) %o A368712 m, k = n, f(n) %o A368712 while m != k: %o A368712 m, k = k, f(k) %o A368712 return max(factorint(m).values(),default=0) # _Chai Wah Wu_, Aug 12 2024 %Y A368712 Cf. A004709, A005117, A008966, A013929, A033150, A051903, A067259. %Y A368712 Cf. A002117, A013661, A253905. %Y A368712 Similar sequences: A368710, A368711, A368713. %K A368712 nonn,easy %O A368712 1,4 %A A368712 _Amiram Eldar_, Jan 04 2024