A277215 a(n) is the smallest even number not congruent to 1 modulo 3 that starts a (2n+1)-element alternating sequence of x/2 and (3x+1) iterations ending in the maximum of its Collatz trajectory.
0, 26, 6, 14, 30, 1214, 1662, 254, 510, 1022, 2046, 28670, 40958, 180222, 32766, 65534, 131070, 1835006, 5767166, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 469762046, 671088638, 268435454, 536870910, 7516192766, 2147483646, 4294967294, 8589934590, 17179869182, 34359738366, 755914244094
Offset: 0
Keywords
Examples
a(0) = 0 = 2*(1*2^0 - 1) since it is the start and end of the first alternating sequence of 1 element and the maximum of its trajectory. a(1) = 26 = 2*(7*2^1 - 1) since sequence 26, 13, 40 has 3 elements and ends in the maximum of its trajectory and since 2, 10 and 18 do not satisfy the conditions for a(1). a(5) = 1214 = 2*(19*2^5 - 1) starts the alternating sequence of 11 elements - 1214, 607, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232 - that ends in the trajectory maximum 9232 while the 11-element alternating sequences starting at 2*(q*2^5 - 1) with odd q<19 either do not end at the trajectory maximum or are congruent to 1 modulo 3 and therefore do not have maximal length.
Crossrefs
Programs
-
Mathematica
collatz[n_] := If[OddQ[n], 3n+1, n/2] altdata[low_, high_] := Module[{n, q, notDone, v, a, m, list={}}, For[n=low, n<=high, n++, q=-1; notDone=True; While[notDone, q+=2; v=2*(q*2^n-1); If[Mod[v, 3]!=1, a=NestWhile[collatz, v, Mod[#,4]!=0&]; m=Max[NestWhileList[collatz, a, #!=1&]]; notDone=(a!=m)]]; AppendTo[list, {n, q, v, a}]]; list]/;(low>1) a277215[n_]:=Map[#[[3]]&, altdata[2,n]] Join[{0,26}, a277215[35]] (* sequence data *)
Comments