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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A271479 Number of steps for the trajectory of n under the map k -> A271478(k) to reach 1. 3
 0, 1, 4, 2, 7, 5, 5, 3, 10, 8, 8, 6, 8, 6, 6, 4, 13, 11, 11, 9, 11, 9, 9, 7, 11, 9, 9, 7, 9, 7, 7, 5, 16, 14, 14, 12, 14, 12, 12, 10, 14, 12, 12, 10, 12, 10, 10, 8, 14, 12, 12, 10, 12, 10, 10, 8, 12, 10, 10, 8, 10, 8, 8, 6, 19, 17, 17, 15, 17, 15, 15, 13, 17, 15, 15, 13, 15, 13 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Arises in studying A266569. Records are 0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, ... and occur at positions 1, 2, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, ... LINKS N. J. A. Sloane, Table of n, a(n) for n = 1..10000 FORMULA It appears that a(1) = 0, a(n) = 1 + 2*(n mod 2) + a(ceiling(n/2)) for n > 1. - Christian Krause, Apr 28 2019 MAPLE f:=n->if n mod 2 = 0 then n/2 else 2*n+2; fi; # A271478 a:=[]; B:=1000; for n from 1 to 100 do    ct:=0; s:=n;    for k from 1 to B while s>1 do    s:=f(s); ct:=ct+1; od: if ct=B then lprint("error, need to increase limit B"); break; fi; a:=[op(a), ct]; od: a; MATHEMATICA Table[Length[NestWhileList[If[EvenQ[#], #/2, 2#+2]&, n, #!=1&]]-1, {n, 80}] (* Harvey P. Dale, May 02 2017 *) CROSSREFS Cf. A266569, A271478. Sequence in context: A115302 A109857 A194075 * A259927 A002560 A124908 Adjacent sequences:  A271476 A271477 A271478 * A271480 A271481 A271482 KEYWORD nonn AUTHOR N. J. A. Sloane, Apr 10 2016 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.

Last modified August 9 04:39 EDT 2020. Contains 336319 sequences. (Running on oeis4.)