OFFSET
0,3
MATHEMATICA
g[n_] := Block[{d = Divisors@ n}, len = Length@ d; If[ OddQ@ len, 0, d[[1 + len/2]] - d[[len/2]]]]; f[n_] := Length@ NestWhileList[g, n, # > 0 &] - 1; t[_] := -1; k = 0; While[k < 1000000001, a = f@ k; If[ t[a] == -1, t[a] = k]; k++]; t@# & /@ Range[0, 17]
PROG
(PARI) a056737(n)=n=divisors(n); n[(2+#n)\2]-n[(1+#n)\2] \\ after M. F. Hasler in A056737
a324920(n) = my(x=n, i=0); while(x!=0, i++; x=a056737(x)); i
a(n) = for(k=0, oo, if(a324920(k)==n, return(k))) \\ Felix Fröhlich, Mar 20 2019
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert G. Wilson v, Mar 20 2019
EXTENSIONS
a(18)-a(20) from Daniel Suteu, Mar 20 2019
STATUS
approved