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.

A199637 Least odd number k such that in the Collatz sequence of k there are n even numbers.

This page as a plain text file.
%I A199637 #38 Mar 02 2019 02:14:04
%S A199637 5,3,21,13,85,17,11,7,15,9,19,37,25,49,33,65,43,87,57,39,79,153,105,
%T A199637 203,135,271,185,123,247,169,329,219,159,295,569,379,283,505,377,251,
%U A199637 167,111,223,445,297,593,395,263,175,351,233,155,103,207,137,91,183
%N A199637 Least odd number k such that in the Collatz sequence of k there are n even numbers.
%C A199637 Previous name was: First number in row n of triangle A199636.
%H A199637 Robert G. Wilson v, <a href="/A199637/b199637.txt">Table of n, a(n) for n = 4..573</a> (first 500 terms from T. D. Noe)
%t A199637 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 100; t = Table[0, {nn}]; cnt = 3; n = 1; While[cnt < nn, n = n + 2; len = Length[Select[Collatz[n], EvenQ]]; If[len <= nn && t[[len]] == 0, t[[len]] = n; cnt++]]; t
%t A199637 f = Compile[{{n, _Real}}, Block[{c = 0, k = n}, While[k > 1, c++; If[OddQ@ Round@ k, k = (3k + 1)/2, k /= 2]]; c]]; k = 1; t[_] := 0; While[k < 2101, If[t@ f@ k == 0, t@ f@ k = k;]; k += 2]; t@# & /@ Range@ 100 (* _Robert G. Wilson v_, Mar 06 2018 *)
%Y A199637 Cf. A199636.
%K A199637 nonn
%O A199637 4,1
%A A199637 _T. D. Noe_, Nov 14 2011
%E A199637 New name from _Robert G. Wilson v_, Mar 06 2018