The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A127886 Steps saved by choice in "3x+1" iteration. 5

%I #16 Aug 20 2017 10:55:12

%S 0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,88,8,0,0,75,0,8,

%T 0,0,8,8,0,8,0,88,0,8,0,0,0,75,0,8,8,0,0,0,88,88,8,8,0,8,0,0,75,75,0,

%U 8,8,0,0,0,0,75,8

%N Steps saved by choice in "3x+1" iteration.

%C Normal "3x+1" iteration requires x->x/2 if x is even. a(n) is the number of iterations that can be saved by also allowing x->3x+1 if x is even.

%H Antti Karttunen, <a href="/A127886/b127886.txt">Table of n, a(n) for n = 1..1000</a> (computed from the b-files of A006577 and A127885)

%F a(n) = A006577(n) - A127885(n).

%e a(9) = 8 because for 9 the traditional 3x+1 iteration follows the 19-step path:

%e 9 -> 28 -> 14 -> 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1

%e while allowing x->3x+1 for even x gives the 11-step path:

%e 9 -> 28 -> 85 -> 256 -> 128 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1

%t Table[Length@ NestWhileList[If[OddQ@ #, 3 # + 1, #/2] &, n, # > 1 &] - Length@ NestWhileList[Flatten[# /. {k_ /; OddQ@ k :> 3 k + 1, k_ /; EvenQ@ k :> {k/2, 3 k + 1}}] &, {n}, FreeQ[#, 1] &], {n, 126}] (* _Michael De Vlieger_, Aug 20 2017 *)

%Y Cf. A006577, A127885, A127887 (gives the indices of the nonzero entries).

%K nonn

%O 1,9

%A _David Applegate_ and _N. J. A. Sloane_, Feb 04 2007

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 May 21 17:21 EDT 2024. Contains 372738 sequences. (Running on oeis4.)