# mathematics of party favors

True story: My wife bought a bunch of party favors for a family gathering. These were rolled up gift wrapping containing some cheap present. She opened on and found a party game labeled “The Mystery Calculator”. She gave it to me.

This is what it is: A small folded cardboard mini-booklet of 6 cards of 4×8 arrays of numbers, ranging from 1 to 63.

Page 1:

$\begin{array}{rrrrrrrr} 1 & 3 & 5 & 7 & 9 & 11 & 13 & 15 \\ 17 & 19 & 21 & 23 & 25 & 27 & 29 & 31 \\ 33 & 35 & 37 & 39 & 41 & 43 & 45 & 47 \\ 49 & 51 & 53 & 55 & 57 & 59 & 61 & 63 \end{array}$

Page 2:

$\begin{array}{rrrrrrrr} 2 & 3 & 6 & 7 & 10 & 11 & 14 & 15 \\ 18 & 19 & 22 & 23 & 26 & 27 & 30 & 31 \\ 34 & 35 & 38 & 39 & 42 & 43 & 46 & 47 \\ 50 & 51 & 54 & 55 & 58 & 59 & 62 & 63 \end{array}$

Page 3:

$\begin{array}{rrrrrrrr} 4 & 5 & 6 & 7 & 12 & 13 & 14 & 15 \\ 20 & 21 & 22 & 23 & 28 & 29 & 30 & 31 \\ 36 & 37 & 38 & 39 & 44 & 45 & 46 & 47 \\ 52 & 53 & 54 & 55 & 60 & 61 & 62 & 63 \end{array}$

Page 4:

$\begin{array}{rrrrrrrr} 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 \\ 24 & 25 & 26 & 27 & 28 & 29 & 30 & 31 \\ 40 & 41 & 42 & 43 & 44 & 45 & 46 & 47 \\ 56 & 57 & 58 & 59 & 60 & 61 & 62 & 63 \end{array}$

Page 5:

$\begin{array}{rrrrrrrr} 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 \\ 24 & 25 & 26 & 27 & 28 & 29 & 30 & 31 \\ 48 & 49 & 50 & 51 & 52 & 53 & 54 & 55 \\ 56 & 57 & 58 & 59 & 60 & 61 & 62 & 63 \end{array}$

Page 6:

$\begin{array}{rrrrrrrr} 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 \\ 40 & 41 & 42 & 43 & 44 & 45 & 46 & 47 \\ 48 & 49 & 50 & 51 & 52 & 53 & 54 & 55 \\ 56 & 57 & 58 & 59 & 60 & 61 & 62 & 63 \end{array}$

Here are the rules to the game.

Show the 6 cards to a friend. Ask him or her secretly pick any number from any card. Tell them to look through the 6 cards and find those cards that the number they selected also appears, and give those cards to you. You add the numbers in the upper left-hand corner of these cards. This sum will be the number your friend selected.

I haven’t proven this works but my guess is that this is based on the mathematics of the Hamming code of length 6 (see this previous post and this one).

# A curious conjecture about self-reciprocal polynomials

Let $p$ be a polynomial
$p(z) = a_0 + a_1z+\dots + a_nz^n\ \ \ \ \ \ a_i\in {\bf C},$
and let $p^*$ denote the reciprocal polynomial
$p^*(z) = a_n + a_{n-1}z+\dots + a_0z^n=z^np(1/z).$
We say $p$ is self-reciprocal if $p=p^*$. For example,
$1+2z+3z^2+2z^3+z^4$
and
$1+2z+3z^2+3z^3+2z^4+z^5$
are self-reciprocal. Suppose
$p(z) = a_0 + a_1z+\dots + a_dz^d+a_{d+1}z^{d+1}+a_dz^{d}+\dots +a_{1}z^{2d+1}+a_0z^{2d+2},\ \ \ \ \ \ a_i\in {\bf C},$
or
$p(z) = a_0 + a_1z+\dots + a_dz^d+a_{d+1}z^{d+1}+a_{d+1}z^{d+2}+a_dz^{d+3}+\dots +a_{1}z^{2d+2}+a_0z^{2d+3},\ \ \ \ \ \ a_i\in {\bf C},$

The question is this: for which increasing sequences $a_0 do the polynomial roots $p(z)=0$ lie on the unit circle $|z|=1$?

Some examples:

This represents, when $d=1$ and $a_0=1$ and $a_1=1.1$ the largest $a_{d+1}$ which has this roots property is as in the plot.

This represents, when $d=1$ and $a_0=1$ and $a_1=1.2$ the largest $a_{d+1}$ which has this roots property is as in the plot.

This represents, when $d=1$ and $a_0=1$ and $a_1=1.3$ the largest $a_{d+1}$ which has this roots property is as in the plot.

This represents, when $d=1$ and $a_0=1$ and $a_1=1.4$ the largest $a_{d+1}$ which has this roots property is as in the plot.

This represents, when $d=1$ and $a_0=1$ and $a_1=1.5$ the largest $a_{d+1}$ which has this roots property is as in the plot.

Conjecture 1: Let $s:{\bf Z}_{>0}\to {\bf R}_{>0}$ be a ”slowly increasing” function.

1. Odd degree case.
If $g(z)= a_0 + a_1z + \dots + a_dz^d$, where $a_i=s(i)$, then the roots of $p(z)=g(z)+z^{d+1}g^*(z)$ all lie on the unit circle.
2. Even degree case.
The roots of
$p(z)=a_0 + a_1z + \dots + a_{d-1}z^{d-1} + a_{d}z^{d} + a_{d-1}z^{d+1} + \dots + a_{1}z^{2d-1}+a_0z^{2d}$
all lie on the unit circle.

The next conjecture gives an idea as to how fast a “slowly increasing” function can grow.

Conjecture 2:* Consider the even degree case only. The polynomial
$p(z)=a_0 + a_1z + \dots + a_{d-1}z^{d-1} + a_{d}z^{d} + a_{d-1}z^{d+1} + \dots + a_{1}z^{2d-1}+a_0z^{2d}$,
with $a_0=1$ and all $a_i>0$, is symmetric increasing if and only if it can be written as a product of quadratics of the form $x^2-2\cos(\theta)x+1$, where all but one of the factors satisfy $2\pi/4\leq \theta\leq 4\pi/3$. One of the factors can be of the form $x^2+\alpha x+1$, for some $\alpha \geq 0$.

* It was pointed out to me by Els Withers that this conjecture is false.