cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A277684 Least k such that A277109(k) = 2^n - 1.

Original entry on oeis.org

0, 6, 17, 18, 69, 70, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 464, 465, 466, 467, 624, 625, 1810, 1811, 1812
Offset: 1

Views

Author

Dmitry Kamenetsky, Oct 26 2016

Keywords

Comments

Are the terms always increasing? Note, if the conjecture in A277109 is true then the terms in this sequence are guaranteed to be increasing.
Since the conjecture in A277109 is true, this sequence is strictly increasing. - Hartmut F. W. Hoft, Aug 16 2018

Examples

			Since A277109(69) = 15 is the first occurrence of 15 = 2^4 - 1, a(4) = 69. - _Hartmut F. W. Hoft_, Aug 16 2018
		

Crossrefs

Cf. A277109.

Programs

  • Mathematica
    collatzN[n_] := Length[NestWhileList[If[EvenQ[#], #/2, 3# + 1]&, n, #!=1&]]
    collatzNrun[n_] := Module[{run=collatzN[n], k=1}, While[collatzN[n+k]==run, k++]; k]
    power2[k_] := Module[{list=NestWhileList[#/2&, k, EvenQ]}, {Last[list], Length[list]-1}]
    (* a277684[] computes all values through index n *)
    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 *)
  • PARI
    nbsteps(n)= s=n; c=0; while(s>1, s=if(s%2, 3*s+1, s/2); c++); c;
    len(n) = {my(ns = 2^n+1); my(nbs = nbsteps(ns)); while(nbsteps(ns+1) == nbs, ns++); ns - 2^n;}
    a(n) = {k=0; while(len(k) != 2^n-1, k++); k;} \\ Michel Marcus, Oct 30 2016

Extensions

Duplicated term 300 removed by Hartmut F. W. Hoft, Aug 16 2018