Polynomial defined recursively by a resultant Cross posting from MSE.
Definition:
For any natural number $n\ge 3$, define the polynomial $P_{n}\left(x_1,x_2,...,x_{n-1},x_{n} \right)$, with indeterminates $x_{i}$, where $i\in\{1,2,...,n-1,n\}$, by the following recursive rule:
$$
\begin{align}
P_{n}\left(x_1,x_2,...,x_{n-1},x_{n} \right) \equiv
\begin{cases}
\left(x_1+x_2+x_3\right)^2-2 \left(x_{1}^2+x_{2}^2+x_{3}^2 \right), & \text{if } n=3 \\\
\mathrm{Res}_{\mathbf{x}}\left(P_{3}\left(x_1,x_2,\mathbf{x} \right),P_{n-1}\left(x_3,x_4,...,x_{n},\mathbf{x} \right) \right), & \text{if } 4 \le n
\end{cases}
\end{align}
$$
Observe that if $4 \le n$ then $P_{n}\left(x_1,x_2,...,x_n \right)= \mathrm{Res}_{\mathbf{x}}\left(P_{n-1}\left(x_1,x_2,...,x_{n-2},\mathbf{x} \right),P_{3}\left(x_{n-1},x_n,\mathbf{x} \right) \right)$.
Example #1:
If $n=4$ then
$$
\begin{align}
P_{4}\left(x_1,x_2,x_3,x_4 \right)=\mathrm{Res}_{\mathbf{x}}\left(P_{3}\left(x_1,x_2,\mathbf{x} \right),P_{3}\left(x_3,x_4,\mathbf{x} \right) \right)=\left(\left(x_1+x_2+x_3+x_4\right)^2-2 \left(x_{1}^2+x_{2}^2+x_{3}^2+x_{4}^2 \right)\right)^2-64x_{1}x_{2}x_{3}x_{4}
\end{align}
$$
Example #2:
If $n=5$ then
$$
\begin{align}
P_{5}\left(x_1,x_2,x_3,x_4,x_5 \right)=\mathrm{Res}_{\mathbf{x}}\left(P_{3}\left(x_1,x_2,\mathbf{x} \right),P_{4}\left(x_3,x_4,x_5,\mathbf{x} \right) \right)=\left(\left(\left(x_1+x_2+x_3+x_4+x_5\right)^2-2 \left(x_{1}^2+x_{2}^2+x_{3}^2+x_{4}^2+x_{5}^2 \right)\right)^2-64\left( x_{1}x_{2}x_{3}x_{4}+x_{1}x_{2}x_{3}x_{5}+x_{1}x_{2}x_{4}x_{5}+x_{1}x_{3}x_{4}x_{5}+x_{2}x_{3}x_{4}x_{5}\right) \right)^2-2048x_{1}x_{2}x_{3}x_{4}x_{5}\left(8\left(x_{1}x_{2}x_{3}+x_{1}x_{2}x_{4}+x_{1}x_{2}x_{5}+x_{1}x_{3}x_{4}+x_{1}x_{3}x_{5}+x_{1}x_{4}x_{5}+x_{2}x_{3}x_{4}+x_{2}x_{3}x_{5}+x_{2}x_{4}x_{5}+x_{3}x_{4}x_{5}\right) -\left(x_1+x_2+x_3+x_4+x_5 \right)\left( \left(x_1+x_2+x_3+x_4+x_5\right)^2-2 \left(x_{1}^2+x_{2}^2+x_{3}^2+x_{4}^2+x_{5}^2 \right)\right)\right)
\end{align}
$$
As you can see, $P_n$ becomes quite complicated fairly quickly.
Question:
I want to find a closed form expression for $P_n$. I doubt that this is feasible, so I also look for alternative ways to compute $P_n$ which may be quicker and more efficient. I would also like to know if there are papers or theories which deal with this sort of polynomial objects. Keeping this in mind, I realize that this question may be regarded as "soft".
Possible lead #1:
The object at hand (might, still) "screams" partition-related symmetric-polynomial objects, like the Schur Polynomials and their generalizations. Unfortunately, playing around with those hasn't produced a hopeful pattern for a general formula, yet.
Possible lead #2:
Even though $P_n$ is a symmetric polynomial, so it has a canonical representation in Elementary Symmetric Polynomials, and some powerful tools for manipulation, it just seems to me, from playing around, that the complexity of $P_{n+1}$ explodes when compared to $P_n$ when they are represented with symmetric polynomials. Another direction might have something to do with identities involving powers of sums of squares, like those apperaing on this wonderful page.
Major Edit (definition changed):
Changed the definition of $P_n$ to an equivalent, more simple one, so one doesn't have to check whether $P_n$ is well defined. The original definition can still be seen on the MSE question (link at the top of this question).
 A: This question is close to a central one in Rational Trigonometry, which is to determine the relations between successive quadrances between a cyclic list of points on a line. Here quadrance refers to what might naively be called "squared distance", but it is better to think of just applying a fixed symmetric bilinear form to successive vectors (it turns out not to matter what the bilinear form is, as long as it is non-degenerate). This is coming from my 2005 book Divine Proportions: Rational Trigonometry to Universal Geometry. The problem stated is more or less Exerise 5.19: Is there a Quintuple quad formula? Generalize.
Here is a solution. First observe that the first polynomial $P_3$ is what in the book is called Archimedes function (pg 64)
$$
A(a,b,c)=(a+b+c)^2-2(a^2+b^2+c^2). 
$$
This determines the squared area of a triangle, in the Euclidean case, in terms of the three quadrances of the sides; in fact $A=16 \cdot \text{area}^2$ so this is really a rational version of Heron's formula.
Second observe that the second polynomial $P_4$ is what in the book is called the Quadruple quad function (pg 70):
$$
Q(a,b,c,d)=((a+b+c+d)^2-2(a^2+b^2+c^2+d^2))^2-64abcd. 
$$
This is closely related to formulas for areas of quadrilaterals. In Theorem 31 it is shown that if $A_1,A_2,A_3,A_4$ are collinear points and $Q_{ij}=Q(A_i,A_j)$ are the quadrances formed by them, then
$$Q(Q_{12},Q_{23},Q_{34},Q_{14})=0.$$
So these polynomials are intimately tied up with the geometry of polygons in the plane, and what happens to them when the polygons become degenerate, that is lie on a line.
When they lie on a line, the quadrances can be interpreted, after a normalization, as squares. This is the reason for the following identities which make the pattern hopefully clear:
$$
A(x^2,y^2,z^2)=(x+y+z)(-x+y+z)(x-y+z)(x+y-z)$$ (Archimedes formula, Theorem 29)
$$
Q(x^2,y^2,z^2,w^2)= (w+x+y+z)(w-x+y+z)(w-x+y-z)(w-x-y+z)(w-x-y-z)(w+x+y-z)(w+x-y+z)(w+x-y-z)$$
(Brahmagupta's identity, Theorem 32)
In general we get, up to a sign, that the $n$th polynomial, evaluated on $n$ squares, is the product of all linear factors where one variable has a coefficient of $1$, and the others all have coefficients of $1$ or $-1$.
This should make it clear how to write down such polynomials: write down the products of all these linear factors, and then expand the polynomial, and rewrite it as a polynomial in the squares of the original variables.
This story is closely connected with many other remarkable formulas, for example due to Robbins on areas of non-convex cyclic polygons and generalizations. For more info, have a look at my YouTube series MathFoundations B starting around video MathFoundations123 and the next ten or so.
