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

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)

A355568 Numbers k > 4 in a Collatz trajectory reaching k after starting at k-1.

Original entry on oeis.org

8, 10, 16, 20, 26, 34, 40, 52, 92, 122, 160, 167, 184, 244, 251, 334, 377, 412, 433, 488, 502, 650, 668, 866, 890, 976, 1154, 1186, 1300, 1336, 1732, 1780, 2308, 3644, 4858, 7288
Offset: 1

Views

Author

Hugo Pfoertner, Jul 10 2022

Keywords

Examples

			8 is a term because the orbit started at 8 - 1 = 7 reaches 8:
  7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8;
10 is a term because it is in the orbit starting at 10 - 1 = 9:
  9 -> 28 -> 14 -> 7 -> 22 -> 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) = A070993(n+1) + 1.

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.

A213330 Minimum deviation from n in Collatz trajectory of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 3, 1, 1, 8, 1, 1, 1, 4, 5, 2, 3, 8, 1, 6, 4, 2, 3, 5, 4, 16, 1, 6, 5, 2, 3, 2, 1, 20, 1, 10, 3, 4, 5, 6, 1, 24, 3, 2, 1, 12, 13, 1, 2, 4, 1, 6, 1, 7, 8, 1, 2, 32, 9, 8, 9, 16, 17, 10, 1, 20, 2, 18, 10, 12, 11, 2, 3, 40, 1, 2
Offset: 1

Views

Author

Jayanta Basu, Mar 03 2013

Keywords

Comments

Assuming Collatz trajectory ends with 1 and also a(1)=0.

Examples

			a(4)=2 because the number closest to 4 in Collatz trajectory of 4 is 2.
		

Crossrefs

Cf. A070165, A355239 (indices of 1's).

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Join[{0}, Table[Min[Rest[Abs[Collatz[n] - n]]], {n, 2, 100}]]
Showing 1-4 of 4 results.