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.

A210483 Triangle read by rows giving trajectory of k/(2n+1) in Collatz problem, k = 1..2n.

This page as a plain text file.
%I A210483 #25 Nov 02 2021 22:24:18
%S A210483 0,2,3,3,3,15,3,6,7,11,8,5,12,5,6,2,7,6,3,10,8,7,7,25,7,22,26,7,7,27,
%T A210483 23,4,4,17,4,12,18,9,4,16,13,15,19,17,18,3,19,2,3,18,20,15,3,5,3,8,19,
%U A210483 8,8,21,8,8,22,15,8,52,8,49,23,19,16,49,8,31,32
%N A210483 Triangle read by rows giving trajectory of k/(2n+1) in Collatz problem, k = 1..2n.
%H A210483 Michel Lagneau, <a href="/A210483/b210483.txt">Rows n = 0..100 of triangle, flattened</a>
%H A210483 J. C. Lagarias, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa56/aa5614.pdf">The set of rational cycles for the 3x+1 problem,</a> Acta Arith. 56 (1990), 33-53.
%e A210483 The 2nd row [3, 3, 15, 3] gives the number of iterations of k/5 and starts with A210468(2):
%e A210483 k=1 => 1/5 -> 8/5 -> 4/5 -> 2/5 with 3 iterations;
%e A210483 k=2 => 2/5 -> 1/5 -> 8/5 -> 4/5 with 3 iterations;
%e A210483 k=3 => 3/5 -> 14/5 -> 7/5 -> 26/5 -> 13/5 -> 44/5 -> 22/5 -> 11/5 -> 38/5 -> 19/5 -> 62/5 -> 31/5 -> 98/5 -> 49/5 -> 152/5 -> 76/5 with 15 iterations;
%e A210483 k=4 => 4/5 -> 2/5 -> 1/5 -> 8/5 with 3 iterations.
%e A210483 The array starts:
%e A210483   [0];
%e A210483   [2, 3];
%e A210483   [3, 3, 15, 3];
%e A210483   [6, 7, 11, 8, 5, 12];
%e A210483   [5, 6, 2, 7, 6, 3, 10, 8];
%e A210483   [7, 7, 25, 7, 22, 26, 7, 7, 27, 23];
%e A210483   ...
%p A210483 with(numtheory): z:={1}:
%p A210483    for m from 0 to 20 do:
%p A210483              T:=array(1..2*m):k:=0:n:=2*m+1:
%p A210483       for nn from 1 to 2*m do:
%p A210483              lst:={nn/n}:x0:=nn: ii:=0:
%p A210483         for a from 1 to 20 while(ii=0) do:
%p A210483              if irem(x0,2)=0 then
%p A210483              x0:=x0/2:lst:=lst union{x0/n} :else ii:=1:fi:
%p A210483         od:
%p A210483              x:=x0*3+n: lst:=lst union {x/n}:
%p A210483                for i from 1 to 6000 do:
%p A210483             x:=x/2: lst:=lst union {x/n}:  if irem(x,2)=1 then
%p A210483             x0:=x:x:=x0*3+n: lst:=lst union {x/n}:else fi:
%p A210483            od:
%p A210483           n0:=nops(lst):if lst intersect z = {1} then
%p A210483           n1:=n0-2: k:=k+1: T[k]:=n1: else n1:=n0-1: k:=k+1:T[k]:=n1:fi:
%p A210483    od:
%p A210483      print (T):
%p A210483 od:
%t A210483 Collatz[n_] := NestWhileList[If[EvenQ[Numerator[#]], #/2, 3 # + 1] &, n, UnsameQ, All]; t = Join[{{0}}, Table[s = Collatz[k/(2*n + 1)]; len = Length[s] - 2; If[s[[-1]] == 2, len = len - 1]; len, {n, 10}, {k, 2*n}]]; Flatten[t] (* _T. D. Noe_, Jan 23 2013 *)
%Y A210483 Cf. A210468.
%K A210483 nonn,tabf
%O A210483 0,2
%A A210483 _Michel Lagneau_, Jan 23 2013