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!)
A238192 In the Collatz (3x+1) iteration of n, the last odd number before 1, or 0 if there is no such number. 3

%I #6 Feb 23 2014 04:05:42

%S 0,0,5,0,5,5,5,0,5,5,5,5,5,5,5,0,5,5,5,5,21,5,5,5,5,5,5,5,5,5,5,0,5,5,

%T 5,5,5,5,5,5,5,21,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,

%U 5,5,5,5,5,5,85,5,5,5,5,5,5,5,5,21,85,5

%N In the Collatz (3x+1) iteration of n, the last odd number before 1, or 0 if there is no such number.

%C Another version of A237660. The only terms appearing here are 0, 5, 21, 85, ..., which is A002450 without 1.

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

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

%Y Cf. A002450 ((4^n-1)/3), A070165 (Collatz trajectories).

%K nonn

%O 1,3

%A _T. D. Noe_, Feb 21 2014

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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)