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.

A159999 Number of numbers not greater than n occurring in Collatz (3x+1) trajectory starting with n.

This page as a plain text file.
%I A159999 #18 Jun 24 2021 06:17:48
%S A159999 1,2,3,3,4,6,5,4,7,6,7,9,7,10,7,5,9,14,11,8,6,12,9,11,14,10,10,16,14,
%T A159999 11,10,6,17,12,9,20,18,17,18,9,13,8,20,16,14,12,13,12,20,21,18,12,10,
%U A159999 18,15,20,24,19,22,16,14,17,15,7,23,25,22,15,13,12,16,23
%N A159999 Number of numbers not greater than n occurring in Collatz (3x+1) trajectory starting with n.
%C A159999 If the Collatz conjecture is true, there are no cycles in the 3x+1 trajectory and the difference between the counts here and those of A076228 is that the start value is counted here but not there; then a(n) = 1+A076228(n) [discovered by sequencedb.net]. - _R. J. Mathar_, Jun 24 2021
%H A159999 R. Zumkeller, <a href="/A159999/b159999.txt">Table of n, a(n) for n = 1..10000</a>
%H A159999 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A159999 a(n) < n for n>6;
%F A159999 a(A033496(n)) = A008908(A033496(n)).
%F A159999 a(n) = f(n,n,1) with f(n,m,x) = if m=1 then x else f(n, A006370(m), if A006370(m)<n then x+1 else x).
%F A159999 a(n) = n - A246436(n); row lengths of triangle A214614. - _Reinhard Zumkeller_, Sep 01 2014
%e A159999 a(9) = #{1,2,4,5,7,8,9} = 7, as
%e A159999 9-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-[4-2-1]*
%e A159999 9-..-..-7-..-..-..-..-..-..-..-..-..-..-5-..-8-[4-2-1]*.
%t A159999 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; f[n_] := Module[{c = Collatz[n]}, Length[Select[c, # <= n &]]]; Table[ f[n], {n, 100}] (* _T. D. Noe_, Mar 07 2013 *)
%o A159999 (Haskell)
%o A159999 a159999 n = length $ takeWhile (<= n) $ sort $ a070165_row n
%o A159999 -- _Reinhard Zumkeller_, Sep 01 2012
%Y A159999 Cf. A033496, A008908, A070165, A214614.
%K A159999 nonn,look
%O A159999 1,2
%A A159999 _Reinhard Zumkeller_, May 04 2009