login
Number of steps for trajectory of n to reach 1 under the map that sends x -> x/3 if x mod 3 = 0, x -> x+3-(x mod 3) if x is not 0 mod 3 (for a 2nd time when n starts at 1).
2

%I #18 Apr 05 2022 17:07:11

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

%T 7,6,8,8,7,8,8,7,7,7,6,7,7,6,7,7,6,6,6,5,7,7,6,7,7,6,6,6,5,7,7,6,7,7,

%U 6,6,6,5,6,6,5,6,6,5,5,5,4,10,10,9,10,10,9,9,9,8,10,10,9,10,10,9,9,9,8,9,9

%N Number of steps for trajectory of n to reach 1 under the map that sends x -> x/3 if x mod 3 = 0, x -> x+3-(x mod 3) if x is not 0 mod 3 (for a 2nd time when n starts at 1).

%C This sequence is generated by the first PARI program below for m=3, p=1. Other values of m and p also converge but not necessarily to 1. For m=2 and p=1 we have the count of steps for the x+1 problem. m=prime and p=m+1 usually converge to 1 but break down for certain values of n. E.g., 17 locks at n=34, 23 at n=49 29 at n=91. I verified m=7 for n up to 100000. 100000 requires 157 steps to reach 1.

%H Antti Karttunen, <a href="/A061436/b061436.txt">Table of n, a(n) for n = 1..100000</a>

%H Cino Hilliard, <a href="http://groups.msn.com/BC2LCC/page.msnw?fc_p=%2Fkx%2Bp%20problems&amp;fc_a=0">The x+1 conjecture</a>

%e x=1. step 1: x = 1+3-1 = 3; step 2: x = 3/3 = 1. Count: 2 steps.

%o (PARI) multxp2(n,m,p) = { print1(2" "); for(j=1,n, x=j; c=0; while(x>1, r = x%m; if(r==0,x=x/m,x=x*p+m-r); print1(x" "); ); ) }

%o (PARI) A061436(n) = if(1==n,2,my(c=0); while(n>1, if(!(n%3), n = n/3, n += (3-(n%3))); c++); (c)); \\ _Antti Karttunen_, Apr 05 2022

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Mar 29 2003