login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213185 For the Collatz (3x+1) iteration starting at n, number of integers k such that T(n,k) = T(n-1,k) +1 where T(n,k) is the k-th number of the trajectory (n is not counted). 2
0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 2, 3, 0, 0, 3, 1, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 3, 4, 0, 0, 2, 1, 2, 0, 1, 2, 0, 0, 1, 1, 1, 0, 2, 3, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 2, 1, 1, 0, 4, 5, 0, 0, 3, 1, 1, 0, 1, 2, 0, 0, 1, 1, 1, 0, 2, 3, 0, 0, 5, 1, 0, 0, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

T(n,k) is periodic, for example

T(6,3) = 10 and T(7,3) = 11;

T(10,3) = 16 and T(11,3) = 17,

…………..

T(6+4m, 3) = 10 + 6m and T(6+4m+1, 3) = 10 + 6m+1.

.................

LINKS

Michel Lagneau, Table of n, a(n) for n = 1..10000

EXAMPLE

a(7) = 2 because the Collatz iterations starting at 7 and 6 are :

T(7,k) =[7, 22, 11, 34, 17, 52,  26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]

T(6,k) =[6, 3, 10, 5, 16, 8,  4, 2, 1] ; the number 7 is not counted

=> T(7,3) = T(6,3) + 1 and T(7,5) = T(6,5) + 1, hence a(7) = 2.

MAPLE

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

for i from 1 to nn do:

   U[i]:=0:

od:

      for n from 1 to nn do:

          a:=0:k:=0:x:=n:

               for i from 1 to 10^8 while (x>1) do:

                  if irem(x, 2)=0 then

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

              else

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

               fi:

            od:

           it:=0:

                for j from 1 to min(a, aa) do:

                   if T[j]=U[j]+1 then

                   it:=it+1:

                 else

                 fi:

                od:

                     for m from 1 to a do:

                        U[m]:=T[m]:

                     od:

          aa:=a: printf(`%d, `, it): od:

CROSSREFS

Cf. A006577, A213186.

Sequence in context: A025442 A260118 A128582 * A285716 A101606 A257469

Adjacent sequences:  A213182 A213183 A213184 * A213186 A213187 A213188

KEYWORD

nonn

AUTHOR

Michel Lagneau, Feb 28 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 April 18 22:08 EDT 2019. Contains 322237 sequences. (Running on oeis4.)