Interview riddle

These interview problems are sometimes weird, where notations are bad, rules are arbitrary, and they expect only one answer where several could fit.

Here is one, which could be the expected one, but probably not:

To compute $a \times b$, take the numerator of $\dfrac{ab^2}{6}$ after simplification of the fraction.

I don't see how they could argue it is wrong.


Easy, just define

$$\begin{array}{rcl}a \times b &=& \hspace{10.5pt}(a-4)(b-5)(a-5)(b-6)(a-6)(b-7)(a-7)(b-8)/72 + \\&& 25(a-3)(b-4)(a-5)(b-6)(a-6)(b-7)(a-7)(b-8)/18 + \\&& 15(a-3)(b-4)(a-4)(b-5)(a-6)(b-7)(a-7)(b-8)/8 \hspace{5.25pt}+ \\&& 49(a-3)(b-4)(a-4)(b-5)(a-5)(b-6)(a-7)(b-8)/36 + \\&&\hspace{5.5pt}7(a-3)(b-4)(a-4)(b-5)(a-5)(b-6)(a-6)(b-7)/18\end{array}$$


This might be a possible solution. For a positive integer $n$, let $\nu_2(n)$ be the largest $k$ such that $2^k|n$, and similarly, let $\nu_3(n)$ be the largest $k$ such that $3^k|n$. Finally let $$h(n)=\frac{n}{3^{\nu_3(n)}2^{1+4\lfloor \nu_2(n)/4\rfloor}}$$ If we consider $$ a\times ~ b {\buildrel \rm def\over =}~b h(ab) $$ then $(k-1)\times k$ coincides with the proposed results for $k=4,5,6,7$ and yields $224$ for $k=8$.