%I #32 Feb 17 2021 14:52:57
%S 31,63,95,127,159,191,223,255,287,319,351,383,415,447,479,511,543,575,
%T 607,639,671,703,735,767,799,831,863,895,927,959,991,1023,1055,1087,
%U 1119,1151,1183,1215,1247,1279,1311,1343,1375,1407,1439,1471
%N a(n) = 32*n - 1, n >= 1. Fourth column of triangle A239126, related to the Collatz problem.
%C This sequence gives all starting values a(n) (in increasing order) of Collatz sequences of length 9 following the pattern (ud)^4, with u (for `up'), mapping an odd number m to 3*m+1, and d (for `down'), mapping an even number m to m/2. The last entry of this sequence is required to be odd and it is given by 162*n-1.
%C This appears in Example 2.2. for x=y = 4 in the M. Trümper paper on p. 7, given as a link below.
%H Vincenzo Librandi, <a href="/A239128/b239128.txt">Table of n, a(n) for n = 1..1000</a>
%H Wolfdieter Lang, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Lang/lang6.html">On Collatz' Words, Sequences, and Trees</a>, J. of Integer Sequences, Vol. 17 (2014), Article 14.11.7.
%H Manfred Trümper, <a href="http://dx.doi.org/10.1155/2014/756917">The Collatz Problem in the Light of an Infinite Free Semigroup</a>, Chinese Journal of Mathematics, Vol. 2014, Article ID 756917, 21 pages.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).
%F O.g.f.: x*(31+x)/(1-x)^2.
%e a(1) = 31 because the Collatz sequence following the pattern udududud is [31, 94, 47, 142, 71, 214, 107, 322, 161], with length 9, ending in the odd number N(4,1) = 161 = 162*1 - 1 from the array A239127, and 31 is the smallest positive number whose Collatz sequence follows this pattern and ends in an odd number.
%e a(4) = 127 with the Collatz sequence [127, 382, 191, 574, 287, 862, 431, 1294, 647] ending in N(4,4) = 647 = 32*4 - 1. 127 is the fourth smallest positive number following this pattern with odd end number.
%t CoefficientList[Series[(31 + x)/(1 - x)^2, {x, 0, 40}], x] (* _Vincenzo Librandi_, Mar 16 2014 *)
%t 32*Range[50]-1 (* _Harvey P. Dale_, Jan 25 2021 *)
%Y Cf. A239126, A125169 (third column), A239127.
%K nonn,easy
%O 1,1
%A _Wolfdieter Lang_, Mar 13 2014