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

A070991 Numbers n such that the trajectory of n under the `3x+1' map reaches n - 1.

Original entry on oeis.org

2, 3, 5, 6, 9, 11, 14, 17, 18, 39, 41, 47, 54, 57, 59, 62, 71, 81, 89, 107, 108, 161, 252, 284, 378, 639, 651, 959, 977, 1368, 1439, 1823, 2159, 2430, 2735, 3239, 4103, 4617, 4859, 6155, 7289, 9233
Offset: 1

Views

Author

Benoit Cloitre and Boris Gourevitch (boris(AT)pi314.net), May 18 2002

Keywords

Comments

From Collatz conjecture, the trajectory of n never reaches n again. Is this sequence finite?
There are no more terms < 10^9. - Donovan Johnson, Sep 22 2013

Examples

			Trajectory of 39 is: (118, 59, 178, 89, 268, 134, 67, 202, 101, 304, 152, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1) and 39-1 = 38 is reached, hence 39 is in the sequence.
		

Crossrefs

Cf. A070165 (Collatz trajectories), A219696, A221213, A070993.

Programs

  • Haskell
    a070991 n = a070991_list !! (n-1)
    a070991_list = filter (\x -> (x - 1) `elem` a070165_row x) [1..]
    -- Reinhard Zumkeller, Feb 22 2013
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Select[Range[100000], MemberQ[Collatz[#], # - 1] &] (* T. D. Noe, Feb 21 2013 *)
  • PARI
    for(n=1,10000,s=n; t=0; while(s!=1,t++; if(s%2==0,s=s/2,s=3*s+1); if(s==n-1,print1(n,","); ); ))
    

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

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.

A222293 Conjectured total number of times that k+n appears in the Collatz (3x+1) sequence of k for k = 1, 2, 3,...

Original entry on oeis.org

37, 30, 34, 30, 31, 29, 28, 38, 42, 32, 40, 40, 49, 30, 40, 40, 54, 45, 46, 40, 49, 44, 41, 48, 47, 54, 48, 41, 50, 44, 54, 45, 49, 60, 53, 47, 54, 50, 56, 44, 48, 50, 54, 47, 54, 38, 56, 47, 60, 48, 63, 48, 47, 45, 56, 53, 49, 49, 62, 52, 50, 54, 53, 52, 49, 46
Offset: 1

Views

Author

T. D. Noe, Feb 22 2013

Keywords

Examples

			a(1) = 37 because k+1 occurs in the Collatz sequence of k for the 37 values in A070993.
		

Crossrefs

Cf. A070993, A221213 (k-n).

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 75; t = Table[0, {nn}]; lastChange = 10; k = 0; While[k < 2*lastChange, k++; c = Collatz[k]; d = Intersection[Range[nn], c - k]; If[Length[d] > 0, lastChange = k; t[[d]]++]]

A303876 a(n) is (apparently) the largest number k whose Collatz (or '3x+1') trajectory includes the number k + n.

Original entry on oeis.org

7287, 7286, 9229, 9228, 9227, 9226, 6147, 9224, 2299, 9222, 9221, 9220, 4255, 3335, 4843, 4086, 7271, 4598, 4839, 3057, 5003, 1758, 7265, 6130, 8511, 8510, 6671, 6670, 7259, 4586, 6667, 7023, 11347, 11346, 15039, 15131, 14695, 8892, 13447, 6114, 10007, 10006
Offset: 1

Views

Author

Jon E. Schoenfield, May 01 2018

Keywords

Comments

Terms listed in the Data section are from an exhaustive search through k = 10^8. (The search for a(1) was performed up through k = 10^9; see A070993.)
It seems extremely unlikely that any larger value of k begins a trajectory that includes k+1. (Note that none of the terms listed in the Data exceed 15131.)

Examples

			a(1) = 7287 is apparently the last term of A070993 ("Numbers n such that the trajectory of n under the '3x+1' map reaches n+1"); the trajectory of k = 7287 begins with 7287, 21862, 10931, 32794, 16397, 49192, 24596, 12298, 6149, 18448, 9224, 4612, 2306, 1153, 3460, 1730, 865, 2596, 1298, 649, 1948, 974, 487, 1462, 731, 2194, 1097, 3292, 1646, 823, 2470, 1235, 3706, 1853, 5560, 2780, 1390, 695, 2086, 1043, 3130, 1565, 4696, 2348, 1174, 587, 1762, 881, 2644, 1322, 661, 1984, 992, 496, 248, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, ..., reaching 7288 = k+1 at the 120th term of the trajectory.
		

Crossrefs

Showing 1-6 of 6 results.