Skip to content
Vamshi Jandhyala

Mathematics

The Monkey Puzzle

For which n can the integers 1..n^2 be placed in an n x n grid so that the multiset of row products matches the multiset of column products? Includes a prime-counting impossibility bound and an integer-programming formulation.

Download PDF →


A combinatorics puzzle on an n×nn \times n grid. The handout derives an impossibility bound from the count of primes in (n2/2,n2)(n^2/2, n^2) and gives a CP-SAT formulation that finds explicit solutions for n=3n = 3 and n=4n = 4.


More mathematical writing →