Puzzle 4

User-friendly statement of problem:
You have 567 letters, numbered from 1 to 567; and 567 envelopes, also numbered from 1 to 567. How can you pair up the letters and the envelopes such the sum of the number on a letter and the number on its envelope is always a power of 2?

Formal statement of problem:
Find a permutation p of { 1, 2, ..., 567 } such that, for each i in the domain, i + p(i) is a power of 2.

There's nothing special about 567. There's a solution for any positive integer.

Source: Zhi-Wei Sun, On Permutations of {1,...,n} and related topics, J. Algebraic Combinatorics 54 (2021) 893-912; via Stan Wagon's Problem of the Week no. 1362.

An answer to puzzle 4.


This is one of several miscellaneous pages listed at http://www.weddslist.com/writing/.