# Russian bus ticket : lucky or not?

In Russia you get into a bus, take a ticket, and sometimes say : Wow, a lucky number! Bus tickets are numbered by 6-digit numbers, and a lucky ticket has the sum of 3 first digits being equal to the sum of 3 last digits. When we were in high school we had to write a code that prints out all the lucky tickets'... show more In Russia you get into a bus, take a ticket, and sometimes say : Wow, a lucky number! Bus tickets are numbered by 6-digit numbers, and a lucky ticket has the sum of 3 first digits being equal to the sum of 3 last digits. When we were in high school we had to write a code that prints out all the lucky tickets' numbers; at least I did, to show my loyalty to the progammers' clan. Now, if you add up all the lucky tickets' numbers you will find out that 13 (the most unlucky number) is a divisor of the result. Can you prove it (without writing a code)?

taken from
http://www.math.utah.edu/~cherk/puzzles....
Update: talaris, the numbers aren't 000000 001001 002002 you could have 002002, 002011, 002020, 002101, 002110, 002200, 011002, 011011, 011020, 011101, 011110, 011200, 020002, 020011, 020020, 020101, 020110, 020200, 101002, 101011, 101020, 101101, 101110, 101200, 110002, 110011, 110020, 110101, 110110, 110200,... show more talaris, the numbers aren't
000000
001001
002002

you could have 002002, 002011, 002020, 002101, 002110, 002200, 011002, 011011, 011020, 011101, 011110, 011200, 020002, 020011, 020020, 020101, 020110, 020200, 101002, 101011, 101020, 101101, 101110, 101200, 110002, 110011, 110020, 110101, 110110, 110200, 200002, 200011, 200020, 200101, 200110, 200200.

and that only for sum = 2.

also, please find the sum too, if possible. i think it is.
Update 2: since the proving part is the easier challenge, so i change the question to focus more on finding the sum of all lucky numbers.
Update 3: pair all into "2 that sum 999999". there are obviously < 1000000 unique numbers (or rather strings). 0 - 27, 28 different sums. 0 = 1^2 (0,0,0) 1 = 3^2 (1,0,0) 2 = 6^2 (1,1,0) and (2,0,0) 3 = 10^2 (1,1,1) (2,1,0) (3,0,0) 4 = 15^2 (4,0,0) (3,1,0) (2,2,0) (2,1,1) 5 = 21^2... show more pair all into "2 that sum 999999".
there are obviously < 1000000 unique numbers (or rather strings).

0 - 27, 28 different sums.
0 = 1^2 (0,0,0)
1 = 3^2 (1,0,0)
2 = 6^2 (1,1,0) and (2,0,0)
3 = 10^2 (1,1,1) (2,1,0) (3,0,0)
4 = 15^2 (4,0,0) (3,1,0) (2,2,0) (2,1,1)
5 = 21^2 (5,0,0)(4,1,0)(3,2,0)(3,1,1)(2,2,1)

the pattern might change at some point. sorry i don't know the answer.