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.
%I A235801 #30 Jan 02 2022 00:32:36 %S A235801 0,1,2,3,7,5,6,7,8,9,17,11,12,13,14,15,27,17,18,19,20,21,37,23,24,25, %T A235801 26,27,47,29,30,31,32,33,57,35,36,37,38,39,67,41,42,43,44,45,77,47,48, %U A235801 49,50,51,87,53,54,55,56,57,97,59,60,61,62,63,107,65,66 %N A235801 Length of n-th horizontal line segment in a diagram of a two-dimensional version of the 3x+1 (or Collatz) problem. %C A235801 In the diagram every cycle is represented by a directed graph. %C A235801 After (3x + 1) the next step is (3y + 1). %C A235801 After (x/2) the next step is (y/2). %C A235801 A235800(n) gives the length of n-th vertical line segment, from left to right, in the same diagram. %H A235801 Chai Wah Wu, <a href="/A235801/b235801.txt">Table of n, a(n) for n = 0..10000</a> %H A235801 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %F A235801 a(n) = 10*k - 3, if n is of the form (6*k-2), k>=1, otherwise a(n) = n. %F A235801 From _Chai Wah Wu_, Sep 26 2016: (Start) %F A235801 a(n) = 2*a(n-6) - a(n-12) for n > 11. %F A235801 G.f.: x*(x^2 + 1)*(x^3 + 2*x^2 + 1)*(x^5 + x^4 + 2*x + 1)/(x^12 - 2*x^6 + 1). (End) %e A235801 The first part of the diagram in the first quadrant: %e A235801 . . . . . . . . . . . . . . . . . . . . . . . . %e A235801 . _ _|_ _|_ _|_ _|_ _|_ _|_ _|_ _. %e A235801 . | | | | | | | |_|_. %e A235801 . | | | | | | | _ _|_. %e A235801 . | | | | | | |_|_ _|_. %e A235801 . | | | | | | _ _|_ _|_. %e A235801 . | | | | | |_|_ _|_ _|_. %e A235801 . _ _|_ _|_ _|_ _|_ _|_ _ _|_ _|_ _|_. %e A235801 . | | | | | |_|_ _|_ _|_ _|_. %e A235801 . | | | | | _ _|_ _|_ _|_ _|_. %e A235801 . | | | | |_|_ _|_ _|_ _|_ _|_. %e A235801 . | | | | _ _|_ _|_ _|_ _|_ _|_. %e A235801 . | | | |_|_ _|_ _|_ _|_ _|_ _| . 11 %e A235801 . _ _|_ _|_ _|_ _ _|_ _|_ _|_ _|_ _| . 17 %e A235801 . | | | |_|_ _|_ _|_ _|_ _| . 9 %e A235801 . | | | _ _|_ _|_ _|_ _| . 8 %e A235801 . | | |_|_ _|_ _|_ _| . 7 %e A235801 . | | _ _|_ _|_ _| . 6 %e A235801 . | |_|_ _|_ _| . 5 %e A235801 . _ _|_ _ _|_ _| . 7 %e A235801 . | |_|_ _| . 3 %e A235801 . | _ _| . 2 %e A235801 . |_| . 1 %e A235801 . . . . . . . . . . . . . . . . . . . . . . . . 0 %e A235801 . a(n) %e A235801 . %e A235801 For an explanation of this diagram as the skeleton of a piping model see A235800. - _Omar E. Pol_, Dec 30 2021 %o A235801 (Python) %o A235801 from __future__ import division %o A235801 A235801_list = [n if n % 6 != 4 else 10*(n//6)+7 for n in range(10**4)] # _Chai Wah Wu_, Sep 26 2016 %Y A235801 Cf. A347270 (all 3x+1 sequences). %Y A235801 Companion of A235800. %Y A235801 Cf. A000027, A004767, A006370, A014682, A016957, A070165, A235795. %K A235801 nonn %O A235801 0,3 %A A235801 _Omar E. Pol_, Jan 15 2014