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
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
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