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.

A221474 Number of families of numbers requiring n iterations of the Collatz (3x+1) function to reach 1.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 2, 0, 2, 0, 2, 2, 3, 3, 4, 4, 5, 4, 6, 5, 6, 5, 7, 6, 7, 7, 8, 7, 9, 8, 9, 9, 10, 10, 11, 10, 11, 11, 12, 11, 13, 12, 13, 13, 14, 14, 15, 14, 16, 15, 16, 16, 17, 17, 18, 17, 18, 18, 19, 19, 20, 19, 21, 20, 22, 21, 23, 22, 24
Offset: 0

Views

Author

T. D. Noe, Feb 13 2013

Keywords

Comments

Looking at the graph of A221473, it is apparent that the numbers requiring n iterations clump into families.

Programs

  • Mathematica
    nn = 41; s = {1}; t = Join[s, Table[s = Union[2 s, (Select[s, Mod[#, 3] == 1 && OddQ[(# - 1)/3] && (# - 1)/3 > 1 &] - 1)/3]; s, {n, nn-1}]]; t2 = Join[{{t[[1]]}}, Table[Select[t[[i]], OddQ], {i, 2, nn}]]; Table[t3 = t2[[n]]; If[Length[t3] <= 1, Length[t3], s = Round[Rest[t3]/Most[t3]]; Length[Select[s, # > 1 &]] + 1], {n, nn}]