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.

A235795 Triangle read by rows T(n,k) in which row n gives the trajectory of n in Collatz problem including the trajectory [1, 4, 2, 1] for n = 1.

This page as a plain text file.
%I A235795 #39 Nov 01 2021 01:08:08
%S A235795 1,4,2,1,2,1,3,10,5,16,8,4,2,1,4,2,1,5,16,8,4,2,1,6,3,10,5,16,8,4,2,1,
%T A235795 7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1,8,4,2,1,9,28,14,7,22,11,
%U A235795 34,17,52,26,13,40,20,10,5,16,8,4,2,1,10,5,16,8,4,2,1,11,34,17,52,26,13
%N A235795 Triangle read by rows T(n,k) in which row n gives the trajectory of n in Collatz problem including the trajectory [1, 4, 2, 1] for n = 1.
%C A235795 Also [1, 4, 2] together with A070165.
%H A235795 Michael De Vlieger, <a href="/A235795/b235795.txt">Table of n, a(n) for n = 1..11449</a> (rows 1..250, flattened)
%H A235795 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%H A235795 <a href="/index/Be#Benford">Index entries for sequences related to Benford's law</a>
%e A235795 The irregular triangle begins:
%e A235795 1,4,2,1;
%e A235795 2,1;
%e A235795 3,10,5,16,8,4,2,1;
%e A235795 4,2,1;
%e A235795 5,16,8,4,2,1;
%e A235795 6,3,10,5,16,8,4,2,1;
%e A235795 7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1;
%e A235795 8,4,2,1;
%e A235795 9,28,14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1;
%e A235795 10,5,16,8,4,2,1;
%e A235795 11,34,17,52,26,13,40,20,10,5,16,8,4,2,1;
%e A235795 12,6,3,10,5,16,8,4,2,1;
%e A235795 13,40,20,10,5,16,8,4,2,1;
%e A235795 14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1;
%e A235795 ...
%t A235795 Prepend[Array[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, #, # > 1 &] &, 10, 2], NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, 1, # > 1 &, {2, 1}]] // Flatten (* _Michael De Vlieger_, Oct 27 2021 *)
%o A235795 (PARI) f(n) = if (n%2, 3*n+1, n/2); \\ A014682
%o A235795 row(n) = {my(list=List()); listput(list, n); until(n==1, n = f(n); listput(list, n)); Vec(list);} \\ _Michel Marcus_, Sep 10 2021
%Y A235795 Cf. A000079, A014682, A006370, A070165, A235800, A235801, A347270 (all 3x+1 sequences).
%K A235795 nonn,tabf
%O A235795 1,2
%A A235795 _Omar E. Pol_, Jan 15 2014