A386376 a(n) is the smallest integer k such that b(n,k) is squarefree, where b(n,1) = n and b(n, k+1) = b(n,k) + rad(b(n, k)) for k >= 1.
1, 1, 1, 2, 1, 1, 1, 2, 5, 1, 1, 4, 1, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 1, 2, 7, 1, 1, 8, 3, 7, 1, 2, 1, 7, 1, 2, 1, 1, 1, 6, 1, 1, 5, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 6, 2, 1, 1, 1, 6, 5, 1, 1, 4, 1, 1, 1
Offset: 1
Examples
For n = 9, b(9,1) = 9, b(9,2) = 9 + rad(9) = 12, b(9,3) = 12 + rad(12) = 18, b(9,4) = 18 + rad(18) = 24, b(9,5) = 24 + rad(24) = 30 is squarefree, so a(9) = 5.
Programs
-
Mathematica
rad[m_]:=Times@@(First@# & /@ FactorInteger@ m);a[n_]:=Module[{k=1,b=n},While[!SquareFreeQ[b],k++;b=b+rad[b]];k];Array[a,87] (* James C. McMahon, Aug 25 2025 *)
-
PARI
A007947(n) = factorback(factorint(n)[, 1]); a(n) = {my(cnt = 1, x = n); while(x != A007947(x), x += A007947(x); cnt++); cnt};
Comments