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!)
A216851 a(n) = T^(floor(log(n)/log(2)))(n) (see comment). 1
1, 1, 5, 1, 4, 5, 17, 1, 11, 4, 13, 5, 5, 17, 53, 1, 10, 11, 11, 4, 4, 13, 40, 5, 44, 5, 47, 17, 17, 53, 161, 1, 29, 10, 10, 11, 11, 11, 101, 4, 107, 4, 37, 13, 13, 40, 121, 5, 14, 44, 44, 5, 5, 47, 47, 17, 49, 17, 152, 53, 53, 161, 485, 1, 28, 29, 29, 10, 10, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
T is the map T(x) = x/2 (x even) and T(x) = (3x+1)/2 (x odd) and T^(k)(x) = T^(k-1)(T(x)). This sequence has some arithmetical structures and fractal structures. For instance multiples of 3 are not in the sequence.
This is floor(log(n)/log(2)) iterations of the Collatz function applied to n. - T. D. Noe, Sep 25 2012
LINKS
FORMULA
Special values: a(2^k)=1, a(2^k-1)=2*3^(k-1)-1, a(4^k+1)=3^k+1, a(2*4^k+1)=3^(k+1)+2,...
MATHEMATICA
T[n_] := If[EvenQ[n], n/2, (3 n + 1)/2]; Table[Nest[T, n, Floor[FullSimplify[Log[n]/Log[2]]]], {n, 100}] (* T. D. Noe, Sep 25 2012 *)
PROG
(PARI) T(x)=if(x%2, (3*x+1)/2, x/2);
p(m, n)=if(n<0, 0, t=0; s=n; while(t<m, s=T(s); t++); s);
a(n)=p(floor(log(n)/log(2)), n)
CROSSREFS
Cf. A014682.
Sequence in context: A068468 A200022 A216157 * A179290 A342014 A355953
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 17 2012
STATUS
approved

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