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.

A187763 Number of common terms in consecutive Collatz trajectories.

Original entry on oeis.org

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, 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, 20, 9, 17, 20, 95, 5, 5, 16, 23, 14, 12, 9, 15, 9, 9, 9, 5, 5, 20
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 04 2013

Keywords

Comments

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

Examples

			.                                | Rows in A070165 (trajectories)
a(1) = #{1} = 1;                 | 1
a(2) = #{2,1} = 2;               | 2,1
a(3) = #{4,2,1} = 3;             | 3,10,5,16,8,4,2,1
a(4) = #{4,2,1} = 3;             | 4,2,1
a(5) = #{5,16,8,4,2,1} = 6;      | 5,16,8,4,2,1
a(6) = #{10,5,16,8,4,2,1} = 7;   | 6,3,10,5,16,8,4,2,1
a(7) = #{8,4,2,1} = 4;           | 7,22,11,34,17,52,26,13,40,20,10,5,..
a(8) = #{8,4,2,1} = 4;           | 8,4,2,1
a(9) = #{10,5,16,8,4,2,1} = 7;   | 9,28,14,7,22,11,34,17,52,26,13,40,..
a(10) = #{10,5,16,8,4,2,1} = 7;  | 10,5,16,8,4,2,1
a(11) = #{10,5,16,8,4,2,1} = 7;  | 11,34,17,52,26,13,40,20,10,5,16,8,4,..
a(12) = #{10,5,16,8,4,2,1} = 7.  | 12,6,3,10,5,16,8,4,2,1
.                                | 13,40,20,10,5,16,8,4,2,1 .
		

Programs

  • Haskell
    import Data.List (intersect)
    a187763 n = a187763_list !! (n-1)
    a187763_list = map length $
                   zipWith intersect a070165_tabf $ tail a070165_tabf
  • Mathematica
    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 *)