What will be the total fare? Along a railway line there are 20 stations each at equal distances. Given that the ticket fare between any two station is Rs 50×(1+ number of station(s) between them), then calculate the total money you will have to spend on buying tickets in order to travel from every station to every station.
My attempt- total number of tickets = 19×20 =380 and then using sum of n terms of an arithmetic progression we can find the fare from 1st station to all other stations and then for the 2nd station, fare would be the the same as 1st-( fare of 2nd to 19th station) and so on but I am not willing to solve it this way so I want to know if there is some easier way to solve it.
 A: I am assuming that the $20$ stations appear one after the other on a single stretch of rail line, so that e.g. going from station $4$ to $7$ means you have to go through stations $5$ and $6$. I am also assuming that you 'simply' have to calculate the sum of the costs of all possible trips, i.e that they are not asking for a schedule where you have to take all these trips in sequence, taking into account where you ended up with the last trip.
Ethan is incorrect that every segment will be travelled an equal number of times (you will actually travel the segments near the middle more often than the segments near the end), but the basic idea behind his hint still works: rather than focusing on the individual trips and counting how many segments they cover, focus instead on the individual segments, and count how many trips will travel over that segment.
So, for example, let's focus in the segment between stations $3$ and $4$. We'll count how many trips will cross this segment going from 'left' to 'right', where we imagine station $1$ is on the far 'left' and station $20$ on the far 'right'. So, this means that we start in station $1$, $2$, or $3$, and we end up in any of the stations $4$ through $20$, and so there are $3 \cdot 17=51$ such trips. 
It is easy to see how this example generalizes to any segment: the segment between stations $n$ and $n+1$ will be travelled $n \cdot (20-n)$ times going from left to right.
So, the total number of segments travelled by trips going from left to right is:
$$\sum_{n=1}^{19} n \cdot (20-n)$$
Multiply this by $2$ to get the total number of segments travelled by all trips, and multiply by $50$ to get the total amount spent. (in other words, multiply the result of the above series by $100$)
Let's see what this works out to:
$$\sum_{n=1}^{19} n \cdot (20-n)=$$
$$20 \cdot \sum_{n=1}^{19} n - \sum_{n=1}^{19} n^2=$$
$$20 \cdot \frac{19 \cdot 20}{2} - \frac{19 \cdot 20 \cdot 39}{6}=$$
$$3800-2470=1330$$
Multiplied by $100$ this gives a total of $133000$
A: The fare between stations $i$ and $j$ is $50|i-j|$ so the total is $$\sum_{i=1}^{20}\sum_{\stackrel{j=1}{i \neq j}}^{20}50|i-j|$$
We can demand $i \lt j$ and double the result giving
$$100\sum_{i=1}^{19}\sum_{j=i+1}^{20}(i-j)=100\sum_{i=1}^{19}i(20-i)+(20-i)(21+i)/2\\=100\sum_{i=1}^{19}20i-i^2+210+i/2+i^2/2$$
and use the formulas for sums of powers.
