[An Infinite 2-Dimensional Derangement]

Leroy Quet qq-quet at mindspring.com
Sat Feb 21 02:23:39 CET 2004


>Leroy Quet <qq-quet at mindspring.com> wrote:
>
>> Take an infinite matrix where each positive integer occurs exactly once 
>> in each column and in each row.
>[snip]
>> 1, 2, 3, 4, 5, 6, 7, 8...
>> 2, 1, 4, 3, 6, 5, 8, 7...
>> 3, 4, 1, 2, 7, 8, 5, 6...
>> 4, 3, 2, 1, 8, 7, 6, 5...
>> 5, 6, 7, 8, 1, 2, 3, 4...
>> 6, 5, 8, 7, 2, 1, 4, 3...
>> 7, 8, 5, 6, 3, 4, 1, 2...
>> 8, 7, 6, 5, 4, 3, 2, 1...
>[snip]
>> So, the most general question I will ask is, what is a closed-form way
>> to calculate each element given only its row and column?
>
>((a-1) XOR (b-1)) + 1
>
>See A003987
>
>Christian


Makes sense.
:)

I just noticed after posting that the closed-form might very well involve 
the binary representations of the row-# and column-#.

thanks, signing off,
Leroy Quet





More information about the SeqFan mailing list