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

 


Number of iterations of A049820(x) = x - A000005(x) needed to reach either zero or such x that x and A049820(x) are coprime, when starting from x = n.
6

%I #13 Jan 07 2019 11:13:25

%S 0,0,1,0,0,0,2,0,1,3,3,0,3,0,4,0,0,0,4,0,5,0,5,0,1,0,6,0,6,0,6,0,7,0,

%T 7,0,1,0,8,0,8,0,8,0,9,1,9,0,9,0,10,0,10,0,10,0,10,0,11,0,10,0,12,1,0,

%U 0,12,0,13,0,13,0,11,0,14,1,14,0,14,0,14,0,15,0,12,0,16,0,15,0,15,0,17,0,16,0,13,0

%N Number of iterations of A049820(x) = x - A000005(x) needed to reach either zero or such x that x and A049820(x) are coprime, when starting from x = n.

%H Antti Karttunen, <a href="/A323073/b323073.txt">Table of n, a(n) for n = 0..16384</a>

%H Antti Karttunen, <a href="/A323073/a323073.txt">Data supplement: n, a(n) computed for n = 1..110880</a>

%F a(0) = 0; for n > 0, if A009191(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(n-A000005(n)).

%F a(n) <= A155043(n).

%o (PARI) A323073(n) = if(!n,0,my(nn=(n-numdiv(n))); if(1==gcd(n,nn),0,1+A323073(nn)));

%o (PARI) A323073(n) = if(!n,0,for(j=0,oo,my(nn=(n-numdiv(n))); if((0==nn)||(1==gcd(n,nn)),return(j+(2==n)),n = nn)));

%Y Cf. A000005, A009191, A049820, A155043, A259934, A286540, A320009, A322974, A322987, A322996.

%Y Cf. A046642 (positions of zeros after the initial a(0)=0).

%K nonn

%O 0,7

%A _Antti Karttunen_, Jan 05 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 21 03:08 EDT 2024. Contains 376079 sequences. (Running on oeis4.)