# CTK Insights

• ## Pages

18 Jan

### Kordemsky's Palindrome Problem

B. A. Kordemsky (1907-1999) was a Russian doyen of popularizers of mathematics, compared in stature to the American Martin Gardner. He even defended (1957) a Ph.D. thesis "Cunning extra curricula problems as a form of development of mathematical initiative in adolescents and grown-ups." By that time he already published his now famous volume Mathematical Savvy (Matematicheskaya Smekalka) that underwent a dozen of printings and was translated in as many languages. I recently tweeted one problem from that book:

Find a 10-digit number, with all digits distinct, whose quotient of division by 9 is a palindrome, i.e., a number that is read the same from both ends.

In his last book Mathematical Allurements (Matematicheskie Zavlekalki), published posthumously in 2000, he tells a story of a 7th grade girl who got tempted to solve that problem and found a solution, too. She informed Kordemsky that her solution was different from the one in the book. Kordemsky encouraged her to look further, for other solutions. Several of her classmates get involved in the search that eventually produced more than 120 solutions. I can imagine Kordemsky's delight in seeing his efforts at attracting young minds to mathematics being born fruit. The kids even came up with something unexpected: many of the numbers they came up lead to other solutions when some pairs of their digits get swapped. For example:

Assume 10-digit $n$, with all digits distinct, is such that $m=n:9$ is a palindrome. Assume also that the 4th and 6th digits of $m$ are both zero, while the fifth one is not $1$. Then swapping the 5th and 6th digits in $n$ gives another solution.

For example, $4059721386:9=451080154$ and $4059271386:9=451030154$, and another pair, $1503276849:9=167030761$ and $1503726849:9=167080761$. But this one $3921457806:9=435717534$ and $3921547806:9=435727534$ seems to fall under a different rule. Kordemsky points to more rules like that.

There is no telling how the kids found their solutions and theorems. On reading the story, as I already mentioned, I sent a tweet on twitter and a nice discussion ensued. I am grateful to Pat Ballew, Colin Beveridge, Dan Bach, Thony Christie, and Vincent Pantaloni.

It so happened that I have recently purchased a Raspberry Pi computer that came loaded with two versions of the programming language Python and full-pledged version of Wolfram's Mathematica.

My first ever Python program produced 626 solutions to Kordemsky's problem. An enhanced version combined those numbers into the sets with identical first and last three digits. It came up with 246 sets, of which only 12 were singletons, most came in pairs, but there were also triples, 4-, 5-, 6-, 7-, and 8-element sets. All pairs fell under the conditions found by the Russian children. Here are the twelve singletons:

$5871269304$ $6071359284$ $1653087429$ $1574086239$
$1643087529$ $5693087124$ $2037641598$ $7594086132$
$4015823796$ $7041269583$ $7051269483$ $7861359402$

One of the two eight element sets:

$7803456912$ $7803546912$ $7804365912$ $7804635912$
$7805364912$ $7805634912$ $7806453912$ $7806543912$

And here's the only one with seven elements:

$2893546107$ $2894356107$ $2894635107$ $2895364107$
$2895634107$ $2896453107$ $2896543107$

With such a big number of solutions, the problem I believe should not be probably left as manual exercise. At this time and day, writing a short computer program should be a routine matter for many of the present generation of middle and high school students. All could get involved in finding and explaining the properties of solutions that allow grouping them into separate sets.

Personally, I draw a satisfaction from having written and debugged my first Python program, from having used a computer to suggest a meaningful exercise, and from figuring out - simple as it was - what made that rule found by the Russian children tick.

seven + = 14