### 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 , with all digits distinct, is such that is a palindrome. Assume also that the 4th and 6th digits of are both zero, while the fifth one is not . Then swapping the 5th and 6th digits in gives another solution.

For example, and , and another pair, and . But this one and 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:

One of the two eight element sets:

And here's the only one with seven elements:

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.