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!)
A233137 Reversed shortest (x+1,2x)-code of n. 4

%I #4 Dec 07 2013 12:56:40

%S 1,2,12,22,122,212,1212,222,1222,2122,12122,2212,12212,21212,121212,

%T 2222,12222,21222,121222,22122,122122,212122,1212122,22212,122212,

%U 212212,1212212,221212,1221212,2121212,12121212,22222,122222,212222,1212222,221222,1221222

%N Reversed shortest (x+1,2x)-code of n.

%C (See A233135.)

%H Clark Kimberling, <a href="/A233137/b233137.txt">Table of n, a(n) for n = 1..1000</a>

%F Define h(x) = x - 1 if x is odd and h(x) = x/2 if x is even, and define H(x,1) = h(x) and H(x,k) = H(H(x,k-1)). For each n > 1, the sequence (H(n,k)) decreases to 1 through two kinds of steps; write 1 when the step is x - 1 and write 2 when the step is x/2. A233137(n) is the concatenation of 1s and 2s, as in the Mathematica program.

%t b[x_] := b[x] = If[OddQ[x], x - 1, x/2]; u[n_] := 2 - Mod[Drop[FixedPointList[b, n], -3], 2]; u[1] = {1}; t = Table[u[n], {n, 1, 30}]; Table[FromDigits[u[n]], {n, 1, 50}] (* A233137 *)

%t Flatten[t] (* A233138 *)

%t Table[FromDigits[Reverse[u[n]]], {n, 1, 30}] (* A233135 *)

%t Flatten[Table[Reverse[u[n]], {n, 1, 30}]] (* A233136 *)

%Y Cf. A040039, A135529, A232559, A000045, A233135, A233136, A233138.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, Dec 05 2013

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 March 28 16:58 EDT 2024. Contains 371254 sequences. (Running on oeis4.)