The $a_i$'s are what you get after the expansion.
If, for example, $P(x)=b_0+b_1x+b_2x^2$, then
\begin{align}P(y)&=b_0+b_1(x+c)+b_2(x+c)^2\\&=b_0+b_1x+b_1c+b_2x^2+2b_2cx+b_2c^2\\&=\overbrace{b_0+b_1c+b_2c^2}^{\phantom{a_0}=a_0}+\overbrace{(b_1+2b_2c)}^{\phantom{a_1}=a_1}x+\overbrace{b_2}^{\phantom{a_2}=a_2}x^2.\end{align}And, as in this case, you always have $a_n=b_n$
The case of $n$ indeterminates corresponds to the orderings of length-$n$ strings of nonnegative integers (which are the exponents of the variables in the monomials). The case of infinitely many indeterminates corresponds to the orderings of infinite strings of nonnegative integers such that only finitely many are nonzero. There are many ways to choose ordering: lexicographic, reverse lexicographic, colexicographic, degree (or, graded) colexicographic, etc.
Computer algebra systems generally have to solve the more general latter problem, as they need to handle polynomials in any variables. In particular, Mathematica claims that it sorts terms in the reverse lexicographic ordering of exponents, but I think it is actually colexicographic:
- first, group the terms according to the greatest index of the variable and sort the groups in the increasing order, e.g. all terms with $x_2$ but no $x_i$ with $i>2$ go before all terms with $x_3$;
- within each group, group and sort in the increasing order according to the exponent of that variable;
- within each subgroup, repeat recursively (ignoring the common factor processed on previous steps).
For the case of $n$ indeterminates, one can implement that sorting by writing down the vectors of exponents and comparing the reversed vectors in the lexicographic order: e.g., for $n=4$, the terms $x_1x_2^2x_3^3$ and $x_1^3x_2x_3^3$ have exponent vectors $(1,2,3,0)$ and $(3,1,3,0)$, after reversing they become $(0,3,2,1)$ and $(0,3,1,3)$, the latter vector goes first lexicographically, so the latter monomial goes first.
Sage uses what can be called degree-decreasing colexicographic order: first, group and sort terms in the decreasing order according to the degree of the monomial, and then within each group apply the Mathematica ordering.
Other CASs or authoritative sources can have different conventions.
Some descriptions of orderings are given in Wikipedia or in the OEIS Wiki.
Best Answer
Ellipses ($\ldots$) are not an operator: they're a piece of informal mathematical notation, meaning "fill in the pattern in the obvious way." As you've observed, in some cases the $\ldots$ can actually mean remove some terms if $n$ is too small: but the author is assuming that the definition is clear enough that you'll be able to figure out these corner cases.
You might object that this is sloppy notation and that the author should have been more careful or rigorous. On the one hand, if the author's definition is causing confusion, you may be right; on the other, math is all about communication, and sometimes a little bit of informality communicates an idea more clearly than full rigor.