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.

A176999 An encoding of the Collatz iteration of n.

This page as a plain text file.
%I A176999 #11 Oct 28 2022 20:52:45
%S A176999 1,1111010,11,11110,11110101,1111011101101010,111,1111011101101010110,
%T A176999 111101,11110111011010,111101011,111101110,11110111011010101,
%U A176999 11110111110101010,1111,111101110110,11110111011010101101,11110111011010111010,1111011,1111110,111101110110101
%N A176999 An encoding of the Collatz iteration of n.
%C A176999 Working from right to left, the sequence of 0's and 1's in a(n) encode, respectively, the sequence of 3x+1 and x/2 steps in the Collatz iteration of n. This is reverse one's complement of Garner's parity vector. Criswell mentions this encoding.
%C A176999 The length of a(n) is A006577(n). The number of 1's in a(n) is A006666(n). The number of 0's in a(n) is A006667(n). The number of terms having length k is A005186(k).
%H A176999 T. D. Noe, <a href="/A176999/b176999.txt">Table of n, a(n) for n = 2..10000</a>
%H A176999 Evans A. Criswell, <a href="http://hsvmovies.com/static_subpages/personal_orig/math/collatz.html">The Collatz Problem (3x+1)</a>
%H A176999 Lynn E. Garner, <a href="http://dx.doi.org/10.1016/S0012-365X(85)80020-0">On heights in the Collatz 3n+1 problem</a>, Discrete Math, 55 (1985), 57-64.
%e A176999 a(5)=11110 because the Collatz iteration for 5 is a 3x+1 step (0) followed by 4 x/2 steps (four 1's).
%t A176999 encode[n_]:=Module[{m=n,p,lst={}}, While[m>1, p=Mod[m,2]; AppendTo[lst,1-p]; If[p==0, m=m/2, m=3m+1]]; FromDigits[Reverse[lst]]]; Table[encode[n], {n,2,26}]
%Y A176999 Cf. A006577, A006666, A006667, A005186.
%Y A176999 Cf. A220145, A260592.
%K A176999 nonn,base
%O A176999 2,2
%A A176999 _T. D. Noe_, Apr 30 2010