Palindromic addition
This was sent to Math Fun by me a couple of days ago:
> the addition a + b = c is palindromic if the digits
> involved in the addition are in the same order
> when read from left to right and from right to left.
> 12 + 9 = 21 is a good example.
> What is the « smallest » addition that shows at
> least once the ten digits 0, 1, 2, 3, … 9?
> I have a « c » with 16 digits in an addition that
> fulfills the requirements — but I am sure this can
> be beaten.
> Hope this is clear and not old hat.
> Best,
> É.
And Maximilian again:
Allan,
Now enters Hans Havermann:
> AW: "The shortest possible would have 19 digits total, right?"
My brute force program found no sums in 19- and 20-digit pandigital palindromes. I've just started a 21-digit run that may take several days to finish. Luckily, I've already snagged a few solutions: 23087 + 16154945 = 16178032 23687 + 10154945 = 10178632 32078 + 16154945 = 16187023 32678 + 10154945 = 10187623
And Victor Miller:
I wrote a program using SAT solvers to find solutions. The sat solver cadical almost instantly shows that (6,6,7) is impossible. It also instantly found the second of Hans' (5,8,8) solutions.
Victor
... and a couple of minutes later, Victor sent this:
I've run my sat solver program to find all solutions. In all cases it does this in a fraction of a second on my desktop. Here are some of the results. The first column gives the number of digits in a,b,c, and the second the number of solutions. 5,8,8 | 24 | 6,9,9 | 60 | 7,8,8 | 324 | 6,8,9 | 0 | 4,8,8 | 0 | 7,7,7 | 0 | 7,9,9 | 324 | 9,9,9 | 330 | 8,9,9 | 378 | 9,10,10 | 15564 |
... and Victor again, a couple of hours later:
Here are the 24 solutions for 5,8,8: 23687 + 10154945 = 10178632 23087 + 16154945 = 16178032 23187 + 60654945 = 60678132 32178 + 60654945 = 60687123 31768 + 20254945 = 20286713 31268 + 70754945 = 70786213 32078 + 16154945 = 16187023 32078 + 61654945 = 61687023 31068 + 72754945 = 72786013 31068 + 27254945 = 27286013 32678 + 10154945 = 10187623 23087 + 61654945 = 61678032 21867 + 30354945 = 30376812 21067 + 38354945 = 38376012 21067 + 83854945 = 83876012 21367 + 80854945 = 80876312 12376 + 80854945 = 80867321 13086 + 27254945 = 27268031 12076 + 38354945 = 38367021 12076 + 83854945 = 83867021 13086 + 72754945 = 72768031 12876 + 30354945 = 30367821 13786 + 20254945 = 20268731 13286 + 70754945 = 70768231
Thank you and bravo Victor — and Allan, Maximilian + Hans!
I guess Carole and me will turn a close idea into a sequence for the OEIS soon.
Commentaires
Enregistrer un commentaire