# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a235800 Showing 1-1 of 1 %I A235800 #82 Dec 30 2021 14:44:41 %S A235800 3,1,7,2,11,3,15,4,19,5,23,6,27,7,31,8,35,9,39,10,43,11,47,12,51,13, %T A235800 55,14,59,15,63,16,67,17,71,18,75,19,79,20,83,21,87,22,91,23,95,24,99, %U A235800 25,103,26,107,27,111,28,115,29,119,30,123,31,127,32 %N A235800 Length of n-th vertical line segment from left to right in a diagram of a two-dimensional version of the 3x+1 (or Collatz) problem. %C A235800 In the diagram every cycle is represented by a directed graph. %C A235800 After (3x + 1) the next step is (3y + 1). %C A235800 After (x/2) the next step is (y/2). %C A235800 A235801(n) gives the length of n-th horizontal line segment in the same diagram. %C A235800 Also A004767 and A000027 interleaved. %H A235800 Chai Wah Wu, Table of n, a(n) for n = 1..10000 %H A235800 Index entries for sequences related to 3x+1 (or Collatz) problem %H A235800 Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1). %F A235800 a(n) = A006370(n) - A193356(n). %F A235800 From _Chai Wah Wu_, Sep 26 2016: (Start) %F A235800 a(n) = 2*a(n-2) - a(n-4) for n > 4. %F A235800 G.f.: x*(x^2 + x + 3)/((x - 1)^2*(x + 1)^2). (End) %e A235800 The first part of the diagram in the first quadrant looks like this: %e A235800 . . . . . . . . . . . . . . . . . . . . . . . . %e A235800 . _ _|_ _|_ _|_ _|_ _|_ _|_ _|_ _. %e A235800 . | | | | | | | |_|_. %e A235800 . | | | | | | | _ _|_. %e A235800 . | | | | | | |_|_ _|_. %e A235800 . | | | | | | _ _|_ _|_. %e A235800 . | | | | | |_|_ _|_ _|_. %e A235800 . _ _|_ _|_ _|_ _|_ _|_ _ _|_ _|_ _|_. %e A235800 . | | | | | |_|_ _|_ _|_ _|_. %e A235800 . | | | | | _ _|_ _|_ _|_ _|_. %e A235800 . | | | | |_|_ _|_ _|_ _|_ _|_. %e A235800 . | | | | _ _|_ _|_ _|_ _|_ _|_. %e A235800 . | | | |_|_ _|_ _|_ _|_ _|_ _| . %e A235800 . _ _|_ _|_ _|_ _ _|_ _|_ _|_ _|_ _| . %e A235800 . | | | |_|_ _|_ _|_ _|_ _| . %e A235800 . | | | _ _|_ _|_ _|_ _| . %e A235800 . | | |_|_ _|_ _|_ _| . %e A235800 . | | _ _|_ _|_ _| . %e A235800 . | |_|_ _|_ _| . %e A235800 . _ _|_ _ _|_ _| . %e A235800 . | |_|_ _| . %e A235800 . | _ _| . %e A235800 . |_| . %e A235800 . . . . . . . . . . . . . . . . . . . . . . . . %e A235800 . 3,1,7,2,11... %e A235800 From _Omar E. Pol_, Aug 25 2021: (Start) %e A235800 The above diagram is the skeleton of a piping model of the 3x+1 or Collatz problem as shown below: %e A235800 The model consists of pipes, 90-degree elbows and three types of pumps that propel the fluid through the pipes. %e A235800 The corner of the infinite diagram looks like this: %e A235800 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . %e A235800 | | | | | | | | _ _ _ . %e A235800 | | | | | | | | | |_. %e A235800 | | | | | | | | | 12 _. %e A235800 | | | | | | _| |_|_ v _| . %e A235800 | | | | | | | ^ |_|_|_ _. %e A235800 | | | | | | | 11 _ _ _ _. %e A235800 | | | | | | _ _ _|_ _ _| | | . %e A235800 _ _ _ _ _ _|_|_ _ _ _ _|_|_ _ _ _ _|_|_| |_ _ _ _|_|_ _. %e A235800 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 10 _ _ _ _ _ _ _. %e A235800 | | | | | | _| |_|_ v _| | | . %e A235800 | | | | | | | ^ |_| |_ _ _ _ _| |_ _. %e A235800 | | | | | | | 9 _| |_ _ _ _ _| |_ _. %e A235800 | | | | | | _ _ _|_ _ _| | | | | . %e A235800 | | | | | | | |_ _ _ _| |_ _ _ _ _|_|_ _. %e A235800 | | | | | | | 8 _ _ _ _| |_ _ _ _ _ _ _ _. %e A235800 | | | | _| |_|_ v _| | | | | . %e A235800 | | | | | ^ |_| |_ _ _ _ _| |_ _ _ _ _|_|_ _. %e A235800 | | | | | 7 _| |_ _ _ _ _| |_ _ _ _ _ _ _ _. %e A235800 | | | | _ _ _|_ _ _| | | | | | | . %e A235800 | | | | | |_ _ _ _| |_ _ _ _ _| |_ _ _ _ _| | . %e A235800 | | | | | 6 _ _ _ _| |_ _ _ _ _| |_ _ _ _ _ _| . %e A235800 | | _| |_|_ v _| | | | | . %e A235800 | | | ^ |_|_|_ _ _ _ _|_|_ _ _ _ _| | . %e A235800 | | | 5 _ _ _ _ _ _ _ _ _ _ _ _ _ _| . %e A235800 | | _ _ _|_ _ _| | | | | . %e A235800 _ _ _ _ _ _|_|_| |_ _ _ _|_|_ _ _ _ _| | . %e A235800 | _ _ _ _ _ _ _ 4 _ _ _ _ _ _ _ _ _ _ _| . %e A235800 | | _| |_|_ v _| | | . %e A235800 | | | ^ |_| |_ _ _ _ _| | . %e A235800 | | | 3 _| |_ _ _ _ _ _| . %e A235800 | | _ _ _|_ _ _| | | . %e A235800 | | | |_ _ _ _| | . %e A235800 | | | 2 _ _ _ _ _| . %e A235800 _| |_|_ v _| . %e A235800 | ^ |_| | . %e A235800 | 1 _ _| . %e A235800 |_ _ _| . %e A235800 . . %e A235800 On the main diagonal of the diagram appear the pumps labeled with the positive integers (A000027). %e A235800 The pumps labeled with the numbers 2, 6, 8, 12, 14, 18, 20, 24, ... (the nonzero terms of A047238) receive the fluid from the EAST and propel it in a SOUTH direction. The fluid then passes through a 90-degree elbow and then heads WEST. %e A235800 The pumps labeled with the numbers 4, 10, 16, 22, 28, 34, 40, ... (A016957) are of the type "TEE" as they have two side inlets and one outlet. These receive the fluid from the EAST and from the WEST and propel it in a SOUTH direction. The fluid then passes through a 90-degree elbow and then heads WEST. %e A235800 The pumps labeled with the numbers 1, 3, 5, 7, 9, 11, 13, ... (A005408) receive the fluid from the EAST and propel it in the NORTH direction. The fluid then passes through a 90-degree elbow and then heads EAST. %e A235800 Starting from the n-th pump we have that the fluid makes a path equivalent to the trayectory of the 3x+1 sequence starting at n. (End) %t A235800 LinearRecurrence[{0,2,0,-1},{3,1,7,2},70] (* _Harvey P. Dale_, Sep 29 2016 *) %o A235800 (Python) %o A235800 from __future__ import division %o A235800 A235800_list = [4*(n//2) + 3 if n % 2 else n//2 for n in range(1,10**4)] # _Chai Wah Wu_, Sep 26 2016 %Y A235800 Cf. A347270 (all 3x+1 sequences). %Y A235800 Cf. Companion of A235801. %Y A235800 Cf. A000027, A004767, A005408, A006370, A014682, A016957, A047238, A070165, A193356, A235795. %K A235800 nonn %O A235800 1,1 %A A235800 _Omar E. Pol_, Jan 15 2014 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE