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.

A375937 Odd numbers which are the largest odd number in their Collatz trajectory.

Original entry on oeis.org

1, 5, 13, 17, 21, 29, 33, 37, 45, 49, 53, 61, 65, 69, 77, 81, 85, 93, 101, 113, 117, 133, 141, 149, 157, 173, 177, 181, 197, 205, 209, 213, 229, 237, 241, 245, 261, 269, 273, 277, 289, 301, 305, 309, 317, 321, 325, 341, 349, 357, 369, 373, 385, 397, 401, 405
Offset: 1

Views

Author

Markus Sigg, Sep 03 2024

Keywords

Comments

a(n) == 1 (mod 4) because the trajectory of 4x+3 is (4x+3, 12x+10, 6x+5, ...) and 6x+5 > 4x+3.

Examples

			The odd elements of the Collatz trajectory (3,10,5,16,8,4,2,1) are {3,5,1} with maximum 5 > 3, so 3 is not a term. The odd elements of the Collatz trajectory (13,40,20,10,5,16,8,4,2,1) are {13,5,1} with maximum 13, so 13 is a term.
		

Crossrefs

Programs

  • PARI
    makeEntries(count) = {
        my(L = List(), k = 1);
        while(#L < count,
            my(m = k);
            while(m > 1 && m <= k,
                m = 3*m + 1;
                while(m % 2 == 0, m = m / 2);
            );
            if(m == 1, listput(L, k));
            k += 2
        );
        L
    };
    print(Vec(makeEntries(56)));

Formula

a(n) = (A176869(n) - 1) / 3 for n > 1.