Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #20 Sep 28 2018 23:25:13
%S 0,6,17,18,69,70,297,298,299,300,301,302,303,304,305,306,307,464,465,
%T 466,467,624,625,1810,1811,1812
%N Least k such that A277109(k) = 2^n - 1.
%C Are the terms always increasing? Note, if the conjecture in A277109 is true then the terms in this sequence are guaranteed to be increasing.
%C Since the conjecture in A277109 is true, this sequence is strictly increasing. - _Hartmut F. W. Hoft_, Aug 16 2018
%e Since A277109(69) = 15 is the first occurrence of 15 = 2^4 - 1, a(4) = 69. - _Hartmut F. W. Hoft_, Aug 16 2018
%t collatzN[n_] := Length[NestWhileList[If[EvenQ[#], #/2, 3# + 1]&, n, #!=1&]]
%t collatzNrun[n_] := Module[{run=collatzN[n], k=1}, While[collatzN[n+k]==run, k++]; k]
%t power2[k_] := Module[{list=NestWhileList[#/2&, k, EvenQ]}, {Last[list], Length[list]-1}]
%t (* a277684[] computes all values through index n *)
%t a277684[n_] := Module[{i, list={0}}, For[i=1, i<=n, i++, If[power2[collatzNrun[2^i+1]+1] == {1, Length[list]+1}, AppendTo[list, i]]]; list]/;n>0 (* _Hartmut F. W. Hoft_, Aug 16 2018 *)
%o (PARI) nbsteps(n)= s=n; c=0; while(s>1, s=if(s%2, 3*s+1, s/2); c++); c;
%o len(n) = {my(ns = 2^n+1); my(nbs = nbsteps(ns)); while(nbsteps(ns+1) == nbs, ns++); ns - 2^n;}
%o a(n) = {k=0; while(len(k) != 2^n-1, k++); k;} \\ _Michel Marcus_, Oct 30 2016
%Y Cf. A277109.
%K nonn,more
%O 1,2
%A _Dmitry Kamenetsky_, Oct 26 2016
%E Duplicated term 300 removed by _Hartmut F. W. Hoft_, Aug 16 2018