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

%I #13 Jan 04 2019 09:04:15

%S 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,

%T 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,

%U 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

%N Number of iterations of A046665(n) = (greatest prime divisor of n) - (least prime divisor of n) [with A046665(1) = 0] required to reach zero.

%H Antti Karttunen, <a href="/A231813/b231813.txt">Table of n, a(n) for n = 0..16384</a> (terms 1..1000 from Clark Kimberling)

%H Antti Karttunen, <a href="/A231813/a231813.txt">Data supplement: n, a(n) computed for n = 0..100000</a>

%F a(0) = 0; for n > 0, a(n) = 1 + a(A046665(n)). - _Antti Karttunen_, Jan 03 2019

%e A046665(6) = 3 - 2, and A046665(1) = 0, so a(6) = 2.

%t 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}]

%o (PARI)

%o A046665(n) = if(1==n,0, my(f = factor(n), lpf = f[1, 1], gpf = f[#f~, 1]); (gpf-lpf));

%o A231813(n) = if(0==n,0, 1+A231813(A046665(n))); \\ _Antti Karttunen_, Jan 03 2019

%Y Cf. A006530, A020639, A046665, A233510.

%K nonn

%O 0,7

%A _Clark Kimberling_, Dec 11 2013

%E Name edited, term a(0)=0 prepended and more terms added by _Antti Karttunen_, Jan 03 2019

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 April 18 03:33 EDT 2024. Contains 371767 sequences. (Running on oeis4.)