login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A028397 Start at n and iterate the map in A006368; a(n) is the smallest number in the trajectory. 6
0, 1, 2, 2, 4, 4, 4, 4, 8, 4, 8, 8, 12, 8, 14, 8, 16, 8, 18, 14, 20, 16, 14, 8, 24, 14, 14, 20, 14, 14, 30, 8, 32, 14, 32, 14, 36, 14, 32, 14, 40, 8, 14, 32, 44, 32, 46, 14, 48, 14, 50, 32, 50, 40, 46, 8, 56, 32, 14, 44, 60, 46, 44, 14, 64, 14, 44, 50, 8, 50, 44, 40, 72, 8, 44, 56 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

T. D. Noe, Table of n, a(n) for n = 0..1000

Index entries for sequences related to 3x+1 (or Collatz) problem

EXAMPLE

Sample iteration: 7->5->4->6->9->7 so a(7)=4.

Sample iteration: 12->18->27->20->30->45->34->51->... so a(12)=12.

MATHEMATICA

Table[Min[NestList[If[EvenQ[#], (3#)/2, Floor[(3#+2)/4]]&, n, 100]], {n, 0, 80}] (* Harvey P. Dale, May 02 2012 *)

PROG

(Perl) $|=1; for($n=1;; ++$n){ $m=$n; $d{$m}=$n, $m=f($m) while !$d{$m};

(Perl) if ($m<$n){ ($c, $m)=($d{$m}, $n); $d{$m}=$c, $m=f($m) while $m >= $n }

(Perl) print"$d{$n}, " } sub f { $_[0]%2 ? int((3*$_[0]+1)/4) : 3*$_[0]/2 }

(PARI) a(n)=local(m); if(n<=0, 0, m=n; while((m!=n=(3*n+n%2)\(2+n%2*2))&n<10^99, m=min(m, n)); m)

CROSSREFS

Cf. A006368, A180853, A028393, A028395.

Sequence in context: A279506 A105678 A309195 * A053644 A279170 A292254

Adjacent sequences:  A028394 A028395 A028396 * A028398 A028399 A028400

KEYWORD

nonn,nice

AUTHOR

N. J. A. Sloane and J. H. Conway

EXTENSIONS

More terms from Hugo van der Sanden

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 24 10:27 EST 2020. Contains 332209 sequences. (Running on oeis4.)