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.

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,","); ); ))
    

A070993 Numbers n such that the trajectory of n under the "3x+1" map reaches n+1.

Original entry on oeis.org

3, 7, 9, 15, 19, 25, 33, 39, 51, 91, 121, 159, 166, 183, 243, 250, 333, 376, 411, 432, 487, 501, 649, 667, 865, 889, 975, 1153, 1185, 1299, 1335, 1731, 1779, 2307, 3643, 4857, 7287
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? (it seems there are no further terms below 10^6).
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) which contains 39+1=40, so 39 is in the sequence.
		

Crossrefs

Cf. A070165 (Collatz trajectories), A221213, A222293, A070991.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Select[Range[100000], MemberQ[Collatz[#], # + 1] &] (* T. D. Noe, Feb 22 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,","); ); ))

Extensions

Corrected by T. D. Noe, Oct 25 2006

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]]++]]
Showing 1-3 of 3 results.