OFFSET
0,2
COMMENTS
a(n) starts a maximal alternating Collatz sequence v_0, ..., v_2n of 2n+1 elements and must have the form v_0 = 2*(q*2^n - 1) where q is the smallest odd number not a multiple of 3 such that v_(2n) = 2*(q*3^n - 1) is the maximum of its Collatz trajectory.
The intermediate elements of the sequence for 1 <= j <= n are v_(2j-1) = q * 2^(n-j+1) * 3^(j-1) - 1, which is odd, and v_(2j) = 2 * (q * 2^(n-j) * 3^j - 1), which is congruent to 2 modulo 4 except for j=n.
A277875(n) is the odd multiplier q in the expression for a(n).
Subsequences of a(n) are related to subsequences of the following sequences depending on the value of q:
For small q > 1, the positions of 2*(q*2^n - 1) among the first 200 numbers in the sequence are:
q = 5: 12, 26, 36, 46, 58, 62, 174;
q = 7: 1, 11, 17, 25, 29, 45, 49, 53, 57, 61, 65, 77, 93, 103, 109, 113, 117, 125, 139, 141, 145, 157, 165, 173, 187, 189, 193;
q = 11: 13, 18, 35, 59, 69, 75, 83, 114, 133, 179;
q = 13: 6, 118;
q = 19: 5;
and among the first 400 numbers are:
q = 17: 222, 229, 230, 268;
(see A277875).
Conjecture: For every n there is an odd number q such that the alternating sequence ends in v_(2n), the maximum of the Collatz trajectory of a(n)=v_0.
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hartmut F. W. Hoft, Nov 03 2016
STATUS
approved