

A070167


a(n) is the smallest starting value that produces a Collatz sequence in which n occurs.


7



1, 2, 3, 3, 3, 6, 7, 3, 9, 3, 7, 12, 7, 9, 15, 3, 7, 18, 19, 7, 21, 7, 15, 24, 25, 7, 27, 9, 19, 30, 27, 21, 33, 7, 15, 36, 37, 25, 39, 7, 27, 42, 43, 19, 45, 15, 27, 48, 43, 33, 51, 7, 15, 54, 55, 37, 57, 19, 39, 60, 27, 27, 63, 21, 43, 66, 39, 45, 69, 15, 27, 72, 73, 43, 75, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

a(n) <= n.  Robert G. Wilson v, Jan 14 2015


LINKS

T. D. Noe, Table of n, a(n) for n=1..10000
Eric Weisstein's World of Mathematics, Collatz Sequence
Index entries for sequences related to 3x+1 (or Collatz) problem


MATHEMATICA

Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 100; t = Table[0, {nn}]; n = 0; zeros = nn; While[zeros > 0, n++; c = Collatz[n]; Do[If[i <= nn && t[[i]] == 0, t[[i]] = n; zeros], {i, c}]]; t (* T. D. Noe, Dec 03 2012 *)


PROG

(Haskell)
import Data.List (findIndex)
import Data.Maybe (fromJust)
a070167 n = fromJust (findIndex (elem n) a070165_tabf) + 1
 Reinhard Zumkeller, Jan 02 2013


CROSSREFS

Cf. A006667, A070165.
Cf. A010120, A054646.
Sequence in context: A049982 A245642 A289559 * A168113 A170895 A141479
Adjacent sequences: A070164 A070165 A070166 * A070168 A070169 A070170


KEYWORD

nonn


AUTHOR

Eric W. Weisstein, Apr 23 2002


STATUS

approved



