As we known, a positive polynomial in $\mathbb{R}\left[x\right]$ can be expressed as a sum of squares of polynomials.
The problem is that whether this holds if some powers is missed.
Let $A$ be a finite set of natural numbers with $0\in A$. Let $\mathcal{P}=Lin\left \{x^n: n\in A\right\}$ be a linear span of monimials and $\mathcal{P}^2=Lin\left\{x^{m+n}:m,n\in A\right\}$. Let $f$ be a positive polynomial in $\mathcal{P}^2$, that is, $f\in \mathcal{P}^2$ and $f\geq 0$.
Questions:
(i) When $f$ can be expressed as a sum of squares of polynomials in $\mathcal{P}$?, i.e, $f=\sum_{i}f_i^2, \quad f_i\in \mathcal{P}$
(ii) Is there another modified form for a sum of squares of polynomials in $\mathcal{P}$?
I will give an example.
Let $A=\left\{0,2,3\right\}$. Then $\mathcal{P}=Lin\left\{1,x^2,x^3\right\}$ and $\mathcal{P}^2=Lin\left\{1,x^2,x^3,x^4,x^5,x^6\right\}$. Take $f=x^2$. We see that the only way to write $f$ as a sum of squares is $f=\left(x\right)^2$. But in this case, $x\notin\mathcal{P}$. This means $f$ cannot expressed as a sum of squares of polynomials in $\mathcal{P}$.
The first question is not much difficult. I focus on the second one.
Idea: a positive polynomial in $\mathcal{P}^2$ is a finite sum of terms $gp^2$, where $p,gp \in \mathcal{P}$ and $g\geq 0$.
Example: Let $A=\left\{0,2,3\right\}$ as above. Take $f=x^4-x^2+1$. We can write
$$f=\left(x^2-1\right)^2+x^2=1.\left(x^2-1\right)^2+x^2.1$$
(we have here $g=1\geq 0,\ p=gp=x^2-1\in \mathcal{P}$ and $g=x^2\geq 0, \ p=1\in \mathcal{P}, \ gp = x^2\in \mathcal{P}$)
This idea may be right or not. I have no counter-example so far. I took some cases with low degree and did see that this really works. But I don't know how to prove it. The condition $p\in \mathcal{P}$ (and also $gp\in \mathcal{P}$) is required (because we want a expression as sum of squares of polinomials in $\mathcal{P}$).
Do you think it works? I think it's true and try to prove it.