OFFSET
0,7
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384 (terms 1..1000 from Clark Kimberling)
Antti Karttunen, Data supplement: n, a(n) computed for n = 0..100000
FORMULA
a(0) = 0; for n > 0, a(n) = 1 + a(A046665(n)). - Antti Karttunen, Jan 03 2019
MATHEMATICA
z = 400; h[n_] := h[n] = FactorInteger[n][[-1, 1]] - FactorInteger[n][[1, 1]]; t[n_] := Drop[FixedPointList[h, n], -2]; Table[t[n], {n, 1, z}]; a = Table[Length[t[n]], {n, 1, z}]
PROG
(PARI)
A046665(n) = if(1==n, 0, my(f = factor(n), lpf = f[1, 1], gpf = f[#f~, 1]); (gpf-lpf));
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Dec 11 2013
EXTENSIONS
Name edited, term a(0)=0 prepended and more terms added by Antti Karttunen, Jan 03 2019
STATUS
approved