# Recursively Rotated Possible Permutation

Wed Sep 8 20:43:29 CEST 2004

```Leroy Quet wrote:
>
> I just submitted the following sequence to the EIS.
>
> %S A000001 1,3,4,2,7,8,6,11,12
> %N A000001 Start with positive integers. On m_th step shift terms a(m+1)
> to a(2m-1) one position to the left, move a(m) to position (2m-1).
> Sequence is limit of reordering.
> %e A000001 [1,2,3,4,5,6,...]->[1,3,2,4,5,6,...]->[1,3,4,5,2,6,...]
> ->[1,3,4,2,6,7,...]->[1,3,4,2,7,5,...]->[1,3,4,2,7,8,...]
> ->...
> %O A000001 1
> %K A000001 ,more,nonn,
>
> Is it a permutation of the positive integers?
> (Or do some integers get rotated out to infinity?)
>
> I bet there is a simple, even trivial, way to express which integer is at
> any particular position. (But a maybe not.)
>
> Could someone please extend this sequence once it appears, and if it is a
> permutation, submit the inverse?
>
> thanks,
> Leroy Quet

I get (15 numbers / line, revealing a nice structure):

1   3   4   2   7   8   6  11  12   9  15  16   5  19  20
14  23  24  17  27  28  13  31  32  22  35  36  25  39  40
18  43  44  30  47  48  33  51  52  10  55  56  38  59  60
41  63  64  29  67  68  46  71  72  49  75  76  34  79  80
54  83  84  57  87  88  26  91  92  62  95  96  65  99 100
45 103 104  70 107 108  73 111 112  50 115 116  78 119 120
81 123 124  37 127 128  86 131 132  89 135 136  61 139 140
94 143 144  97 147 148  66 151 152 102 155 156 105 159 160
21 163 164 110 167 168 113 171 172  77 175 176 118 179 180
121 183 184  82 187 188 126 191 192 129 195 196  58 199 200

and the inverse

1   4   2   3  13   7   5   6  10   40   8   9  22  16  11
12  19  31  14  15 121  25  17  18   28  67  20  21  49  34
23  24  37  58  26  27  94  43  29   30  46 364  32  33  76
52  35  36  55  85  38  39 202  61   41  42  64 148  44  45
103  70  47  48  73 112  50  51 175   79  53  54  82 283  56
57 130  88  59  60  91 139  62  63 1093  97  65  66 100 229
68  69 157 106  71  72 109 166  74   75 256 115  77  78 118
607  80  81 184 124  83  84 127 193   86  87 445 133  89  90
136 310  92  93 211 142  95  96 145  220  98  99 337 151 101
102 154 526 104 105 238 160 107 108  163 247 110 111 850 169

Hugo Pfoertner

```