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.

Showing 1-2 of 2 results.

A025587 '3x+1' record-setters (blowup factor).

Original entry on oeis.org

1, 3, 7, 15, 27, 703, 1819, 4255, 4591, 9663, 26623, 60975, 77671, 113383, 159487, 1212415, 2684647, 3041127, 3873535, 4637979, 5656191, 6416623, 6631675, 19638399, 80049391, 210964383, 319804831, 1410123943, 70141259775, 77566362559
Offset: 0

Views

Author

Keywords

Comments

This sequence uses the highest even number reached, which will always be a power of 2 larger than A295163. - Howard A. Landman, Nov 20 2017
A proper subsequence of A006884. - Robert G. Wilson v, Dec 23 2017
Let m be the maximum value in row n of A070165. This sequence is the record transform of the sequence m/n for n >= 1. - Michael De Vlieger, Mar 13 2018

Crossrefs

Cf. A295163 for maximum odd number reached, and A061523 for blowup factors.

Programs

  • C
    // First column is this sequence.
    // Second column is the maximum (even) N reached.
    // Third column is A061523, the ratio of those.
    // NOTE: This could be made faster by special-casing 1,
    // starting at 3, and incrementing by 4, since all terms except 1
    // are congruent to 3 (mod 4).
    #include    
    long long    i=1, n, max_n;
    long double    max_ratio=1.0, ratio;
    int main()
    {
        while(1)
        {
            n = i;
            max_n = n;
            while (n > i) // Can stop as soon as we drop below start.
            {
                n = 3*n + 1;
                max_n = (n > max_n) ? n : max_n;
                while (!(n&1))
                {
                    n >>= 1;
                }
             }
            ratio = (double) max_n / (double) i;
            if (ratio > max_ratio)
            {
                max_ratio = ratio;
                printf("%lld\t%lld\t%Lf\n", i, max_n, max_ratio);
            }
            i += 2;
        }
    }
    // Howard A. Landman, Nov 14 2017
  • Mathematica
    With[{s = Array[Max@ NestWhileList[If[EvenQ@#, #/2, 3 # + 1] &, #, # > 1 &]/# &, 2^18]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Mar 13 2018 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 03 2001
a(27) from Jud McCranie, Apr 23 2012
a(26) corrected (was missing least significant digit) by Howard A. Landman, Nov 14 2017

A295163 Max odd N reached by Collatz sequence "record setters".

Original entry on oeis.org

1, 5, 17, 53, 3077, 83501, 425645, 2270045, 2717873, 9038141, 35452673, 197759717, 523608245, 827370449, 5734125917, 46548912269, 117539270981, 207572633873, 286185056525, 439600764977, 804164538869, 1599998981789, 20114203639877, 102098975067917
Offset: 0

Views

Author

Howard A. Landman, Nov 14 2017

Keywords

Comments

Sequence A025587 gives the starting numbers which "break the record", in the Collatz problem, for the ratio of the highest (even) number reached to the starting number. This sequence gives the corresponding highest odd number reached. That is, a(n) = highest odd number reached in Collatz problem starting from A025587(n) = (highest even number reached, minus 1) divided by 3. It is therefore monotonic increasing by definition, and also a(n)/A025587(n) is monotonic increasing by definition.

Crossrefs

Cf. A025587 for starting numbers and A061523 for (truncated, even) blowup factors.

Programs

  • Python
    # Print numbers with higher ratio of max Collatz descendant to self
    # than that of any previous number.
    # First column is OEIS sequence A025587 (the starting numbers).
    # Second column is this sequence (their max odd descendants).
    # Third column is OEIS sequence A061523 (before truncation).
    i = 1
    max_ratio = 1.0
    while(True):
        n = i
        max_n = n
        while n >= i: # Done as soon as we dip below starting point
            n = 3*n + 1
            max_n = max(n, max_n)
            while (n&1) == 0:
                n = n >> 1
        ratio = float(max_n) / i
        if ratio > max_ratio:
            max_ratio = ratio
            print(i, (max_n - 1)/3, max_ratio)
        i += 2
    # Howard A. Landman, Nov 15 2017
Showing 1-2 of 2 results.