login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213215 For the Collatz (3x+1) iterations starting with the odd numbers k, a(n) is the smallest k such that the trajectory contains n successive odd numbers == 3 (mod 4). 1
3, 7, 15, 27, 27, 127, 255, 511, 1023, 1819, 4095, 4255, 16383, 32767, 65535, 77671, 262143, 459759, 1048575 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

n is possibly counted.

The sequence is infinite because the Collatz trajectory starting at k = 2^n - 1 contains at least n consecutive odd numbers == 3(mod 4) such that 3*2^n - 1 -> 3^2*2^(n-1)-1 -> ... -> 2*3^(n-1)-1 and then -> 3^n-1 -> ...  but the numbers of this sequence are not always of this form, for example 27, 1819, 4255, 77671, 459759, ...

LINKS

Table of n, a(n) for n=1..19.

EXAMPLE

a(3)=15 because the Collatz iterations starting at 15 and 6 are : 15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1 and the 3 consecutive odd numbers 15, 23 and 35 are congruent to 3 (mod 4).

MAPLE

nn:=200:T:=array(1..nn):

for n from 1 to 20 do:jj:=0:

         for m from 3 by 2 to 10^8 while(jj=0) do:

               for i from 1 to nn while(jj=0) do:

               T[i]:=0:od:a:=1:T[1]:=m:x:=m:

                     for it from 1 to 100 while (x>1) do:

                         if irem(x, 2)=0 then

                         x := x/2:a:=a+1:T[a]:=x:

                         else

                         x := 3*x+1: a := a+1: T[a]:=x:

                        fi:

                     od:

                     jj:=0:aa:=a:

                       for j from 1 to aa while(jj=0) do:

                         if irem(T[j], 4)=3 then

                         T[j]:=1:

                         else

                         T[j]:=0:

                       fi:

                      od:

                         for p from 0 to aa-1 while (jj=0) do:

                         s:=sum(T[p+k], k=1..2*n):

                         if s=n then

                         jj:=1: printf ( "%d %d \n", n, m):

                         else

                         fi:

                  od:

              od:

           od:

MATHEMATICA

Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; countThrees[t_] := Module[{mx = 0, cnt = 0, i = 0}, While[i < Length[t], i++; If[t[[i]] == 3, cnt++; i++, If[cnt > mx, mx = cnt]; cnt = 0]]; mx]; nn = 15; t = Table[0, {nn}]; n = 1; While[Min[t] == 0, n = n + 2; c = countThrees[Mod[Collatz[n], 4]]; If[c <= nn && t[[c]] == 0, t[[c]] = n; Do[If[t[[i]] == 0, t[[i]] = n], {i, c}]]]; t (* T. D. Noe, Mar 02 2013 *)

CROSSREFS

Cf. A006577, A000225, A024023, A213214.

Cf. A222598 (similar).

Sequence in context: A001649 A303220 A301894 * A324719 A170884 A182836

Adjacent sequences:  A213212 A213213 A213214 * A213216 A213217 A213218

KEYWORD

nonn

AUTHOR

Michel Lagneau, Mar 02 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 13:09 EDT 2021. Contains 343742 sequences. (Running on oeis4.)