login
A368712
The maximal exponent in the prime factorization of the cubefree numbers.
5
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, 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, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1
OFFSET
1,4
COMMENTS
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... .
LINKS
FORMULA
a(n) = A051903(A004709(n)).
a(n) = 2 - A008966(A004709(n)) for n >= 2.
Except for n = 1, a(n) = 1 or 2.
a(n) = 1 if and only if A004709(n) is squarefree (A005117).
a(n) = 2 if and only if A004709(n) > 1 and is nonsquarefree (A013929), i.e., A004709(n) is in A067259.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 - zeta(3)/zeta(2) = 2 - A253905 = 1.269237030598... .
MATHEMATICA
s[n_] := If[n == 1, 0, Max @@ Last /@ FactorInteger[n]]; s /@ Select[Range[100], Max[FactorInteger[#][[;; , 2]]] < 3 &]
(* or *)
f[n_] := Module[{e = Max @@ FactorInteger[n][[;; , 2]]}, If[e < 3, e, Nothing]]; f[1] = 0; Array[f, 100]
PROG
(PARI) lista(kmax) = {my(e); print1(0, ", "); for(k = 2, kmax, e = vecmax(factor(k)[, 2]); if(e < 3, print1(e, ", "))); }
(Python)
from sympy import mobius, integer_nthroot, factorint
def A368712(n):
def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x, 3)[0]+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return max(factorint(m).values(), default=0) # Chai Wah Wu, Aug 12 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jan 04 2024
STATUS
approved