The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A231813 Number of iterations of A046665(n) = (greatest prime divisor of n) - (least prime divisor of n) [with A046665(1) = 0] required to reach zero. 2
 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 3, 2, 2, 1, 2, 3, 2, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 3, 3, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 2, 1, 4, 1, 2, 3, 2, 3, 2, 1, 2, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
 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 EXAMPLE A046665(6) = 3 - 2, and A046665(1) = 0, so a(6) = 2. 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)); A231813(n) = if(0==n, 0, 1+A231813(A046665(n))); \\ Antti Karttunen, Jan 03 2019 CROSSREFS Cf.  A006530, A020639, A046665, A233510. Sequence in context: A302031 A237353 A293460 * A158210 A322307 A087802 Adjacent sequences:  A231810 A231811 A231812 * A231814 A231815 A231816 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 29 10:06 EDT 2020. Contains 337428 sequences. (Running on oeis4.)