OFFSET
1,12
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
If A008966(n) = 1 [when n is in A005117], a(n) = 0, otherwise a(n) = 1 + a(A097246(n)). - Antti Karttunen, Jul 29 2018
MATHEMATICA
f[n_] := Product[{p, e} = pe; NextPrime[p]^Quotient[e, 2] p^Mod[e, 2], {pe, FactorInteger[n]}];
a[n_] := (NestWhileList[f, n, !SquareFreeQ[#]&] // Length) - 1;
Array[a, 105] (* Jean-François Alcover, Nov 18 2021 *)
PROG
(PARI)
A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i, 1]+1)^(f[i, 2]\2))*((f[i, 1])^(f[i, 2]%2))); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 03 2004
EXTENSIONS
Edited by Sam Alexander, Jan 05 2005
STATUS
approved