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.
%I A210468 #24 Dec 10 2016 19:26:20 %S A210468 0,2,3,6,5,7,4,17,8,31,10,76,24,8,5,35,28,17,16,11,27,13,22,44,72,54, %T A210468 90,15,16,38,6,35,39,113,86,99,92,33,53,63,13,54,170,79,56,71,41,107, %U A210468 23,11,96,67,30,158,87,9,40,49,22,116,62,60,7,54,71,44,67 %N A210468 Collatz (3x+1) problem with rational numbers: number of steps to reach the end of the cycle starting with 1/(2n+1). %C A210468 This variation of the "3x+1" problem with a class of rational numbers is as follows: start with any number 1/(2n+1). If the numerator is even, divide it by 2, otherwise multiply it by 3 and add 1. Do we always reach the end of a cycle with a rational number? It is conjectured that the answer is yes. %C A210468 If x is of the form 1/2n, each trajectory is divergent because the numerator is always odd and tends into infinity. %C A210468 If x is of the form x = m/(2n+1) where m is an integer, it is conjectured that the number of steps tends into the end of a finite cycle. %C A210468 In this sequence, it appears that the last number of the cycle is 1 when 2n+1 is a power of 3. For example, starting with 1/9, the trajectory is 1/9 -> 4/3 -> 2/3 -> 1/3 -> 2 -> 1 with 5 iterations. %C A210468 Observations: the last number of each trajectory has three possible forms: 1, 2/(2n+1) or a form m/(2n+1) where m> 2. %H A210468 Michel Lagneau, <a href="/A210468/b210468.txt">Table of n, a(n) for n = 0..10000</a> %H A210468 J. C. Lagarias, <a href="http://pldml.icm.edu.pl:80/mathbwn/element/bwmeta1.element.bwnjournal-article-aav56i1p33bwm?q=bwmeta1.element.bwnjournal-number-aa-1990-56-1&qt=CHILDREN-STATELESS">The set of rational cycles for the 3x+1 problem,</a> Acta Arith. 56 (1990), 33-53. %e A210468 For n = 3, a(3) = 6 because the corresponding trajectory of 1/7 requires 6 iterations to reach the last term of the cycle: %e A210468 1/7 -> 10/7 -> 5/7 -> 22/7 -> 11/7 -> 40/7 -> 20/7 and 20/7 is the last term because 20/7 -> 10/7 is already in the trajectory. The rational 10/7 has two antecedents: 1/7 and 20/7 are in the same trajectory (this property is conjecturally impossible in the classical 3x + 1 problem with x integer). The periodic nontrivial loop contains 6 distinct rational numbers (20/7 ->10/7->5/7 ->22/7 -> 11/7 -> 40/7). %p A210468 with(numtheory): z:={1}:for m from 0 to 80 do: n:=2*m+1:lst:={1/n}:x0:=1: x:=x0*3+n: lst:=lst union {x/n}:for i from 1 to 10000 do: x:=x/2: lst:=lst union {x/n}: if irem(x,2)=1 then x0:=x:x:=x0*3+n: lst:=lst union {x/n}:else fi:od: n0:=nops(lst):if lst intersect z = {1} then n1:=n0-2: printf(`%d, `,n1): else n1:=n0-1: printf(`%d, `,n1):fi: od: %t A210468 Collatz[n_] := NestWhileList[If[EvenQ[Numerator[#]], #/2, 3 # + 1] &, n, UnsameQ, All]; Join[{0}, Table[s = Collatz[1/(2 n + 1)]; len = Length[s] - 2; If[s[[-1]] == 2, len = len - 1]; len, {n, 100}]] (* _T. D. Noe_, Jan 22 2013 *) %Y A210468 Cf. A006577. %K A210468 nonn,nice %O A210468 0,2 %A A210468 _Michel Lagneau_, Jan 22 2013