wrote a simple script - the smallest number is 2519.

here is my way.

$solution = "F";

$x=0;

while($solution eq "F")

{

$x++;

$flag=0;

for($i=1;$i<10;$i++)

{

$j=$i+1;

$y=$x%$j;

if($y != $i)

{$flag=1;}

}

if($flag==0)

{

$solution="T";

print $x,"\n";

}

}

## it is perl.

Do people actually use perl? I never have..

In the spirit of ATL, I present to you my method, in C#, for calculating the answer by brute force, without taking into account LCM's. I'm curious how much smaller this could be done.

int GetNumber() {

int i=1, n=1; bool r=false;

for (;!r;){if(i%n==(n-1)){n=n%11+1;r=n==11;}else{i++;n=1;}}return i;}

Well, that is shorter code than mine would be, but mine would be done sooner. I don't feel like writing it, but I could do it!

I am actually kinda disappointed in myself for not realizing it was a LCM problem... when I was thinking about it in my head, I was considering each sentence seperately and finding a rule for each one. First there was no even numbers allowed (2:1), then the last digit had to be a 9 (10:9), then the second to last digit had to be one less than 3, 6, or 9 (3:2), etc. I came up with 5039 this way... (5039+1)/2 - 1 = 2519, go figure