Q:

Number of 7-digit numbers in the form abcdcba and average of such

(i) How many 7-digit numbers are in the form of abcdcba   (symmetric about the digit in the middle)? 
(ii) What is the average of such numbers? 
I manage to answer the first question correctly. I treated the first part as how many unique integers are there between 1000 and 9999 inclusive. Which is 9*9*8*7 = 4536. 
I have no idea on the second part. I don't think there exist a close form solution to sum up a range of unique integers. 

A:

The first and last digits range uniformly from $1$ to $9$, so average $5$.  Having chosen the first digit the second has to be different.  It is the average of the digits that are left, which is the same as the average of all the digits except $5$.  That is $\frac 19 \cdot 40 = \frac {40}9$  We could have picked any digit next after the first, so the average of each digit is $\frac {40}9$.  The average number is then $5(10^6+1)+\frac {40}9(10^5+10^4+10^3+10^2+10)$

