On May 2, 2:40 pm, Ken Bloom <kbl... / gmail.com> wrote:
> On Fri, 02 May 2008 13:18:37 -0500, Martin DeMello wrote:
> > On Fri, May 2, 2008 at 10:25 AM, Matthew Moss <matthew.m... / gmail.com>
> > wrote:
> >> > 1089 * 9 = 9801
> >>  > 2178 * 4 = 8712
> >>  > 10989 * 9 = 98901
> >>  > 21978 * 4 = 87912
> >>  > 109989 * 9 = 989901
> >>  > 219978 * 4 = 879912
>
> >>  One of the interesting things I found is that those are all divisible
> >>  by 9. I wonder if that is a property of all such numbers?
>
> > Let the numbers be x = a....c and y = c....a
>
> > then, if y divides x, so does (x-y)
>
> > x = 10^n a + 10b + c
> > y = 10^n c + 10 d + a
>
> > x - y = (a - c)(10^n-1) + 10 (b-d)
>
> > the first term obviously divides by 9
>
> > for the second term, note that b and d are reversals of each other. It
> > can be shown that their difference again divides by 9 (again splitting
> > off the first and last digit as above, or simply by induction on the
> > number of digits, which come to think of it I should have done from the
> > beginning)
>
> > martin
>
> I think this may fall into the category of a spoiler.

Perhaps... though for most folks, they'll still have to write the Ruby
code to test any particular integer in that subset. It may run faster,
but there's still code to be written...

Though, while running my code up to 100,000,000, I'm beginning to
notice other very distinct patterns that would greatly limit the
subset to examine much more than what the current discussion
describes.  That may be too much of a spoiler, so I won't go into it
now.