login
A102442
Number of iterations needed to transform n by A102440 into a 3-smooth number.
5
0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 2, 1, 1, 0, 2, 0, 2, 1, 1, 2, 3, 0, 1, 2, 0, 1, 3, 1, 3, 0, 2, 2, 1, 0, 2, 2, 2, 1, 3, 1, 3, 2, 1, 3, 4, 0, 1, 1, 2, 2, 3, 0, 2, 1, 2, 3, 4, 1, 4, 3, 1, 0, 2, 2, 3, 2, 3, 1, 4, 0, 4, 2, 1, 2, 2, 2, 3, 1, 0, 3, 4, 1, 2, 3, 3, 2, 4, 1, 2, 3, 3, 4, 2, 0, 3, 1, 2, 1, 3, 2, 3, 2, 1
OFFSET
1,11
LINKS
FORMULA
a(n) = 0 iff n is 3-smooth (A003586);
a(A102444(n)) = n and a(m) < n for m < a(A102444(n)).
EXAMPLE
A102440(A102440(A102440(41))) = 24 and A102440(24) = 24:
41 -> 3*13 -> 3*[13->2*5] = 2*3*5 -> 2*3*[5->2*2] = 3*2^3 = 24,
therefore a(41) = 3, A102443(41) = 24.
MATHEMATICA
g[p_] := g[p] = For[k = p - 1, True, k--, If[PrimeOmega[k] == 2, Return[k]]]; f[n_] := Product[{p, e} = pe; If[p <= 3, p, g[p]]^e, {pe, FactorInteger[n]}]; a[n_] := -1 + Length @ NestWhileList[f, n, FactorInteger[#][[-1, 1]] > 3 &]; Array[a, 105] (* Amiram Eldar, Feb 04 2020 after Jean-François Alcover at A102440 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 09 2005
STATUS
approved