# [seqfan] Hilbert hotel and first differences -- rooms with label 3k move to 3(k-1)

Eric Angelini Eric.Angelini at kntv.be
Tue Nov 23 12:30:24 CET 2010

```Hello SeqFans,

[if the mail is badly formatted, read its proper disposition here]

S = 1,3,2,5,9,4,13,19,6,25,32,7,39,47,8,55,65,10,75,86,11,97,109,12,121,135,14,149,164,15,...

Ask to every term in room 3k to move to room 3(k-1)
The resulting sequence D shows the first differences of S.
(moving rooms have a dot on top and new rooms have a star):
.     .       .       .        .       .        .         .          .          .
S =    1,3,2,5,9,4,13,19,6,25,32,7,39,47, 8,55,65,10,75,86,11,97,109,12,121,135,14,149,164,15,...
D =  2,1,3,4,5,9,6,13,19,7,25,32,8,39,47,10,55,65,11,75,86,12,97,109,14,121,135,15,149,...
*     *     *       *       *       *        *        *         *          *
First differences D of S appear here:

S = 1,3,2,5,9,4,13,19, 6, 25,32, 7, 39,47, 8, 55, 65, 10, 75, 86, 11, 97, 109, 12,  121,135,  14,  149, 164,  15,...
D =  2,1,3,4,5,9, 6, 13,19, 7, 25,32, 8, 39,47, 10, 55, 65, 11, 75, 86, 12,  97, 109,  14, 121, 135,  15,  149,...

-------------------------------------

We wanted S to:
- be a permutation of N
- be the lexicographically first sequence to show those properties

S is a simple concatenation of triplets (a,b,c),(d,e,f),(g,h,i),...

The triplets are linked like this;
-example with (a,b,c) and (d,e,f):

d = b+c
f = the smallest integer not yet present in S
e = d+f

If we start with a=1 we automatically get the whole sequence:

1,3,2,
5,9,4,
13,19,6,
25,32,7,
39,47,8,
55,65,10,
75,86,11,
97,109,12,
121,135,14,
149,164,15,
...

Best,
É.

```