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.

A080816 Triangle read by rows in which n-th row gives trajectory of n (omitting n itself) under the map k -> k+1 if k odd, k -> k/2 if k even.

This page as a plain text file.
%I A080816 #14 Dec 24 2024 07:25:52
%S A080816 1,4,2,1,2,1,6,3,4,2,1,3,4,2,1,8,4,2,1,4,2,1,10,5,6,3,4,2,1,5,6,3,4,2,
%T A080816 1,12,6,3,4,2,1,6,3,4,2,1,14,7,8,4,2,1,7,8,4,2,1,16,8,4,2,1,8,4,2,1,
%U A080816 18,9,10,5,6,3,4,2,1,9,10,5,6,3,4,2,1,20,10,5,6,3,4,2,1,10,5,6,3,4,2,1,22
%N A080816 Triangle read by rows in which n-th row gives trajectory of n (omitting n itself) under the map k -> k+1 if k odd, k -> k/2 if k even.
%H A080816 Cino Hilliard, <a href="http://groups.msn.com/BC2LCC/page.msnw?fc_p=%2Fkx%2Bp%20problems&amp;fc_a=0">The x+1 conjecture</a>
%e A080816 7 -> 8 -> 4 -> 2 -> 1, so the 7th row is 8,4,2,1.
%t A080816 Table[Rest[NestWhileList[If[OddQ[#],#+1,#/2]&,n,#>1&]],{n,30}] //Flatten (* _Harvey P. Dale_, Dec 04 2016 *)
%o A080816 (PARI) xnp1(n,p) = { print1(1" "); for(x=1,n, p1 = x; while(p1>1, if(p1%2==0,p1/=2,p1 = p1*p+1;); print1(p1" ") ) ) }
%Y A080816 Cf. A061313 (row lengths).
%K A080816 easy,nonn,tabf
%O A080816 1,2
%A A080816 _Cino Hilliard_, Mar 26 2003