login
Size of the set of b for numbers of the form 2^n*x + b that cannot be the smallest element of a set giving a duration of infinite flight in the Collatz problem.
1

%I #116 May 09 2024 09:08:43

%S 1,3,6,13,28,56,115,237,474,960,1920,3870,7825,15650,31473,63422,

%T 126844,254649,509298,1021248,2050541,4101082,8219801,16490635,

%U 32981270,66071490,132455435,264910870,530485275,1060970550,2123841570,4253619813,8507239626,17027951548,34095896991,68191793982,136471574881,272943149762,546144278026,1093108792776,2186217585552

%N Size of the set of b for numbers of the form 2^n*x + b that cannot be the smallest element of a set giving a duration of infinite flight in the Collatz problem.

%C In the Collatz Problem A014682, it is possible to apply the algorithm to first degree polynomials like 2^n*x+b, where n is integer and 0 <= b < 2^n. The iteration terminates by two cases:

%C 1) a*x+b where a < 2^n: the polynomial is "minimized"

%C 2) a*x+b where a is odd and a > 2^n, parity cannot be found. The polynomial cannot be minimized.

%C The sequence counts how many first degree polynomials end like first case for each n > 0.

%C The interest of this sequence is that every number that can be described by a minimized polynomial cannot be the smallest element of a set of value of T(n) = infinity.

%F a(n) = 2^n - A076227(n) for n >= 2. - _Ruud H.G. van Tol_, Mar 13 2023

%F For n not in A020914, a(n) = 2*a(n-1). - _Ruud H.G. van Tol_, Apr 12 2023

%e Example with 4x+b (0 <= b < 4):

%e 4x is even, thus gives 2x, 2 < 4 (first case).

%e 4x+1, is odd thus 3(4x+1)+1 = 12x+4 is even, thus (12x+4)/2/2=3x+1 3 < 4, first case.

%e 4x+2 is even, (4x+2)/2=2x+1, 2 < 4, first case.

%e 4x+3 with same way gives 9x+8. 9 is odd and 9 > 4, second case.

%e That explains why the second (n=2) term in sequence is 3.

%t a[n_] := Module[{b, p0, p1, minimized = 0}, For[b = 1, b <= 2^n, b++, {p0, p1} = {b, 2^n}; While[Mod[p1, 2] == 0 && p1 >= 2^n, {p0, p1} = If[Mod[p0, 2] == 0, {p0/2, p1/2}, {3*p0+1, 3*p1}]; If[p1<2^n, minimized += 1]]]; minimized]; Table[Print[an = a[n]]; an, {n, 1, 40}] (* _Jean-François Alcover_, Feb 12 2014, translated from _D. S. McNeil_'s Sage code *)

%o (Sage)

%o def A182137(n):

%o minimized = 0

%o for b in range(2**n):

%o p = [b, 2**n]

%o while p[1] % 2 == 0 and p[1] >= 2**n:

%o p[0],p[1] = [p[0]/2, p[1]/2] if p[0] % 2 == 0 else [3*p[0]+1, 3*p[1]]

%o if p[1] < 2**n: minimized += 1

%o return minimized # _D. S. McNeil_, Apr 14 2012

%o (PARI) upto(P=18)= my(r=Vec([1, 1], P)); forstep(x=3,2^P,4, my(s=x, p=0); until(s<=x, s= if(s%2, 3*s+1, s)/2; if(p++ > P, next(2))); if((2^p>x), r[p]++)); for(i=2, #r, r[i]+= 2*r[i-1]); print(r); \\ _Ruud H.G. van Tol_, Mar 13 2023

%Y Cf. A020914, A074473, A076227, A100982, A186109, A243115.

%K nonn

%O 1,2

%A _Jérôme STORTI_, Apr 14 2012

%E More terms from _D. S. McNeil_, Apr 14 2012

%E a(31) from _Jérôme STORTI_, Apr 22 2012

%E a(32)-a(38) from _Jérôme STORTI_, Jul 21 2012

%E a(39) from _Jérôme STORTI_, Jul 26 2012

%E a(40) from _Jérôme STORTI_, Feb 08 2014

%E a(37) and a(39) corrected by _Jérôme STORTI_, Dec 29 2021