login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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)
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
Sequence in context: A371883 A237353 A293460 * A158210 A322307 A087802
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 08:50 EDT 2024. Contains 374731 sequences. (Running on oeis4.)