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-3 of 3 results.

A355239 Starting values k > 4 of a Collatz iteration reaching either k-1 or k+1.

Original entry on oeis.org

5, 6, 7, 9, 11, 14, 15, 17, 18, 19, 25, 33, 39, 41, 47, 51, 54, 57, 59, 62, 71, 81, 89, 91, 107, 108, 121, 159, 161, 166, 183, 243, 250, 252, 284, 333, 376, 378, 411, 432, 487, 501, 639, 649, 651, 667, 865, 889, 959, 975, 977, 1153, 1185, 1299, 1335, 1368, 1439, 1731, 1779, 1823, 2159, 2307, 2430, 2735, 3239, 3643, 4103, 4617, 4857, 4859, 6155, 7287, 7289, 9233
Offset: 1

Views

Author

Hugo Pfoertner, Jul 04 2022

Keywords

Comments

No further terms up to 2*10^9. It is conjectured that this is the full list of starting values of Collatz trajectories reaching k-1 or k+1, and that the number of steps until this happens is one of the 8 terms of A355240.
There are no further terms up to 31100000000. - Dmitry Kamenetsky, Oct 17 2022

Crossrefs

Programs

  • Python
    def f(x): return 3*x+1 if x%2 else x//2
    def ok(n):
        if n < 5: return False
        ni, targets = n, {1, n-1, n+1}
        while ni not in targets: ni = f(ni)
        return ni in {n-1, n+1}
    print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Jul 04 2022

A355240 Numbers of steps until the Collatz iteration started at k > 4 returns to either k-1 or k+1.

Original entry on oeis.org

3, 8, 13, 44, 75, 88, 101, 119
Offset: 1

Views

Author

Hugo Pfoertner, Jul 04 2022

Keywords

Comments

It is conjectured that no further terms exist.
Michael S. Branicky checked this up to 2*10^9 and found no starting values other than the 74 terms given in A355239 and also in the attached file.
The terms of this sequence are expected to be close to the sum of numerators and denominators in a rational approximation of log(2)/log(3). See A355514, which shares terms 3, 8, 13, 44, 75.

Crossrefs

A355239 gives the list of starting values.

Programs

  • PARI
    a355240(upto) = {my(D=List()); for (start=5, upto, my(old=start,new=0,L=0);while (abs(new-start)>1 && new!=1, L++; if(old%2==0,new=old/2,new=3*old+1);old=new); if(new>1, listput(~D,L))); Set(D)};
    a355240(10000)

A355569 Numbers k > 4 in a Collatz trajectory reaching k after starting at k+1.

Original entry on oeis.org

5, 8, 10, 13, 16, 17, 38, 40, 46, 53, 56, 58, 61, 70, 80, 88, 106, 107, 160, 251, 283, 377, 638, 650, 958, 976, 1367, 1438, 1822, 2158, 2429, 2734, 3238, 4102, 4616, 4858, 6154, 7288, 9232
Offset: 1

Views

Author

Hugo Pfoertner, Jul 10 2022

Keywords

Examples

			a(1) = 5 because the orbit started at 6 = a(1) + 1 reaches 5:
  6 -> 3 -> 10 -> 5;
a(2) = 8 because the orbit started at 9 = a(2) + 1 reaches 8:
  9 -> 28 -> 14 -> 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8;
a(3) = 10 because the orbit started at 11 = a(3) + 1 reaches 10:
  11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10.
		

Crossrefs

Programs

  • PARI
    collatz(start, target) = {my(old=start, new=0); while (new!=target && new!=1, if(old%2==0, new=old/2, new=3*old+1); old=new); new>1};
    for (k=5, 10000, if(collatz(k+1, k), print1(k, ", ")))

Formula

a(n) = A070991(n+2) - 1.
Showing 1-3 of 3 results.