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.

A224360 Triangle read by rows: T(n,k) = -1 + length of the Collatz sequence of -(n-k)/(2k+1) for n >= 1 and k >= 0.

This page as a plain text file.
%I A224360 #26 Aug 07 2025 07:27:01
%S A224360 0,1,1,4,2,4,2,0,5,9,4,3,7,10,4,5,3,6,11,5,8,4,1,0,11,1,9,14,3,6,8,13,
%T A224360 6,8,15,4,11,4,9,12,3,10,5,5,17,4,4,7,0,2,11,16,4,18,36,6,4,14,12,4,9,
%U A224360 16,6,9,37,13,6,5,1,16,7,13,6,1,19,16,14,7,9
%N A224360 Triangle read by rows: T(n,k) = -1 + length of the Collatz sequence of -(n-k)/(2k+1) for n >= 1 and k >= 0.
%C A224360 This sequence is an extension of A210516 with negative values.
%C A224360 We consider the triangle T(n,k) = -(n-k)/(2k+1) for n = 1,2,... and k = 0..n-1.
%C A224360 The example shown below gives a general idea of this regular triangle. This contains all negative fractions whose denominator is odd and all integers. Now, from T(n,k) we could introduce a 3D triangle in order to produce a complete Collatz sequence starting from each rational T(n,k).
%C A224360 The initial triangle T(n,k) begins
%C A224360   -1,
%C A224360   -2, -1/3;
%C A224360   -3, -2/3, -1/5;
%C A224360   -4, -3/3, -2/5, -1/7;
%C A224360   -5, -4/3, -3/5, -2/7, -1/9;
%C A224360   -6, -5/3, -4/5, -3/7, -2/9, -1/11;
%C A224360   ...
%e A224360 The triangle of lengths begins
%e A224360   1;
%e A224360   2, 2;
%e A224360   5, 3, 5;
%e A224360   3, 1, 6, 10;
%e A224360   5, 4, 8, 11, 5;
%e A224360   ...
%e A224360 Individual numbers have the following Collatz sequences (the first term is not counted):
%e A224360 [-1] => [1] because: -1 -> -1 with 0 iterations;
%e A224360 [-2 -1/3] => [1, 1] because: -2 -> -1 => 1 iteration; -1/3 -> 0 => 1 iteration;
%e A224360 [-3 -2/3 -1/5] => [4, 2, 4] because: -3 -> -8 -> -4 -> -2 -> -1 => 4 iterations; -2/3 -> -1/3 -> 0 => 2 iterations; -1/5 -> 2/5 -> 1/5 -> 8/5 -> 4/5 => 4 iterations.
%t A224360 Collatz2[n_] := Module[{lst = NestWhileList[If[EvenQ[Numerator[#]], #/2, 3 # + 1] &, n, Unequal, All]}, If[lst[[-1]] == -1, lst = Drop[lst, -2], If[lst[[-1]] == 2, lst = Drop[lst, -2], If[lst[[-1]] == 4, lst = Drop[lst, -1], If[MemberQ[Rest[lst], lst[[-1]]], lst = Drop[lst, -1]]]]]]; t = Table[s = Collatz2[-(n - k)/(2*k + 1)]; Length[s] - 1, {n, 13}, {k, 0, n - 1}]; Flatten[t] (* program from _T. D. Noe_, adapted for this sequence - see A210516 *)
%Y A224360 Cf. A210516, A210688, A224299, A224300, A224361.
%K A224360 nonn,tabl
%O A224360 1,4
%A A224360 _Michel Lagneau_, Apr 04 2013
%E A224360 Better definition from _Michel Marcus_, Sep 14 2017