A102442 Number of iterations needed to transform n by A102440 into a 3-smooth number.
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
Keywords
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
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 *)