login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A222597 Number of terms of the Collatz (3x+1) trajectory of n that are greater than n. 4

%I #8 Aug 26 2016 23:31:21

%S 0,0,5,0,2,3,12,0,13,1,8,1,3,8,11,0,4,7,10,0,2,4,7,0,10,1,102,3,5,8,

%T 97,0,10,2,5,2,4,5,17,0,97,1,10,1,3,5,92,0,5,4,7,0,2,95,98,0,9,1,11,4,

%U 6,91,93,0,5,3,6,0,2,3,87,0,97,1,7,1,3,10,13,0,6

%N Number of terms of the Collatz (3x+1) trajectory of n that are greater than n.

%H T. D. Noe, <a href="/A222597/b222597.txt">Table of n, a(n) for n = 1..10000</a>

%t Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Length[Select[Collatz[n], # > n &]], {n, 100}]

%o (PARI) a(n)=my(k=n,s); while(k>1, k=if(k%2,3*k+1,k/2); if(k>n,s++)); s \\ _Charles R Greathouse IV_, Aug 26 2016

%Y Cf. A033496, A213199 (location of zero and nonzero terms).

%K nonn

%O 1,3

%A _T. D. Noe_, Mar 01 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)