login
Number of common terms in consecutive Collatz trajectories.
1

%I #12 Jul 13 2013 12:03:48

%S 1,2,3,3,6,7,4,4,7,7,7,7,10,9,5,5,13,16,8,5,5,9,7,7,11,9,9,16,9,17,5,

%T 5,14,9,9,19,16,22,9,9,5,5,16,14,9,17,7,7,16,20,12,9,12,106,9,20,16,

%U 20,9,17,20,95,5,5,16,23,14,12,9,15,9,9,9,5,5,20

%N Number of common terms in consecutive Collatz trajectories.

%C Size of intersection of row n and row n+1 in A070165.

%H Reinhard Zumkeller, <a href="/A187763/b187763.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%e . | Rows in A070165 (trajectories)

%e a(1) = #{1} = 1; | 1

%e a(2) = #{2,1} = 2; | 2,1

%e a(3) = #{4,2,1} = 3; | 3,10,5,16,8,4,2,1

%e a(4) = #{4,2,1} = 3; | 4,2,1

%e a(5) = #{5,16,8,4,2,1} = 6; | 5,16,8,4,2,1

%e a(6) = #{10,5,16,8,4,2,1} = 7; | 6,3,10,5,16,8,4,2,1

%e a(7) = #{8,4,2,1} = 4; | 7,22,11,34,17,52,26,13,40,20,10,5,..

%e a(8) = #{8,4,2,1} = 4; | 8,4,2,1

%e a(9) = #{10,5,16,8,4,2,1} = 7; | 9,28,14,7,22,11,34,17,52,26,13,40,..

%e a(10) = #{10,5,16,8,4,2,1} = 7; | 10,5,16,8,4,2,1

%e a(11) = #{10,5,16,8,4,2,1} = 7; | 11,34,17,52,26,13,40,20,10,5,16,8,4,..

%e a(12) = #{10,5,16,8,4,2,1} = 7. | 12,6,3,10,5,16,8,4,2,1

%e . | 13,40,20,10,5,16,8,4,2,1 .

%t coll[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]; Table[Length[Intersection[coll[n],coll[n+1]]],{n,76}] (* _Jayanta Basu_, May 28 2013 *)

%o (Haskell)

%o import Data.List (intersect)

%o a187763 n = a187763_list !! (n-1)

%o a187763_list = map length $

%o zipWith intersect a070165_tabf $ tail a070165_tabf

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jan 04 2013