cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

User: Jérôme STORTI

Jérôme STORTI's wiki page.

Jérôme STORTI has authored 1 sequences.

A182137 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.

Original entry on oeis.org

1, 3, 6, 13, 28, 56, 115, 237, 474, 960, 1920, 3870, 7825, 15650, 31473, 63422, 126844, 254649, 509298, 1021248, 2050541, 4101082, 8219801, 16490635, 32981270, 66071490, 132455435, 264910870, 530485275, 1060970550, 2123841570, 4253619813, 8507239626, 17027951548, 34095896991, 68191793982, 136471574881, 272943149762, 546144278026, 1093108792776, 2186217585552
Offset: 1

Author

Jérôme STORTI, Apr 14 2012

Keywords

Comments

In the Collatz Problem A014682, it is possible to apply the algorithm to first degree polynomials like 2^n*x+b, where n is an integer and 0 <= b < 2^n. The iteration terminates by two cases:
1) a*x+b where a < 2^n: the polynomial is "minimized"
2) a*x+b where a is odd and a > 2^n, parity cannot be found. The polynomial cannot be minimized.
The sequence counts how many first degree polynomials end like first case for each n > 0.
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.

Examples

			Example with 4x+b (0 <= b < 4):
4x is even, thus gives 2x, 2 < 4 (first case).
4x+1, is odd thus 3(4x+1)+1 = 12x+4 is even, thus (12x+4)/2/2=3x+1 3 < 4, first case.
4x+2 is even, (4x+2)/2=2x+1, 2 < 4, first case.
4x+3 with same way gives 9x+8. 9 is odd and 9 > 4, second case.
That explains why the second (n=2) term in sequence is 3.
		

Programs

  • Mathematica
    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 *)
  • 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
  • Sage
    def A182137(n):
        minimized = 0
        for b in range(2**n):
            p = [b, 2**n]
            while p[1] % 2 == 0 and p[1] >= 2**n:
                p[0],p[1] = [p[0]/2, p[1]/2] if p[0] % 2 == 0 else [3*p[0]+1, 3*p[1]]
            if p[1] < 2**n: minimized += 1
        return minimized # D. S. McNeil, Apr 14 2012
    

Formula

a(n) = 2^n - A076227(n) for n >= 2. - Ruud H.G. van Tol, Mar 13 2023
For n not in A020914, a(n) = 2*a(n-1). - Ruud H.G. van Tol, Apr 12 2023

Extensions

More terms from D. S. McNeil, Apr 14 2012
a(31) from Jérôme STORTI, Apr 22 2012
a(32)-a(38) from Jérôme STORTI, Jul 21 2012
a(39) from Jérôme STORTI, Jul 26 2012
a(40) from Jérôme STORTI, Feb 08 2014
a(37) and a(39) corrected by Jérôme STORTI, Dec 29 2021