Algebra – Sequence with Average of Squares Proportional to Square of Average

algebra-precalculussummation

Usually in math, the order of operations matters when you do anything more complicated than addition or multiplication. If you have a list of numbers, whether you apply the average or the squaring first gives different results. But can you build a sequence where the order doesn't matter? Let's say there's a sequence of numbers $a_1,a_2,…,a_n$ and $a_k=f(k)\ne constant$. What functions $f(x)$ could you choose so that $$\left(\frac1n\sum_{k=1}^na_k\right)^2=c \cdot\frac1n\sum_{k=1}^na_k^2$$
where $c$ is a constant that is independent of $n$?

Edit: I believe that if $a_1\ne0$ or $a_2\ne0$, then $c\le1.5$

Since $c$ is independent of $n$, I can plug in $n=2$ into the equation.
$$\left(\frac12\sum_{k=1}^2a_k\right)^2=c \cdot\frac12\sum_{k=1}^2a_k^2$$

$$\left(\frac{a_1+a_2}{2}\right)^2=c \cdot\frac{a_1^2+a_2^2}{2}$$

$$\frac{(a_1+a_2)^2}{4}=c \cdot\frac{a_1^2+a_2^2}{2}$$

$$(a_1+a_2)^2=2c(a_1^2+a_2^2)$$

$$a_1^2+2a_1a_2+a_2^2=2c(a_1^2+a_2^2)$$

$$2a_1a_2=2c(a_1^2+a_2^2) – (a_1^2+a_2^2)$$

$$2a_1a_2=(2c-1)(a_1^2+a_2^2)$$

$$a_1a_2=(c-1/2)(a_1^2+a_2^2)$$

Now let's assume that $c\gt1.5$ so that $c-1/2\gt1$. There are two possibilities: $a_1^2+a_2^2$ is positive or $a_1^2+a_2^2$ is zero. For the first case we multiply both sides of the inequality $c-1/2\gt1$ by the positive number $a_1^2+a_2^2$ to get

$$(c-1/2)(a_1^2+a_2^2)\gt a_1^2+a_2^2$$

If $a_1^2+a_2^2$ is zero then

$$(c-1/2)(a_1^2+a_2^2)= a_1^2+a_2^2$$

so $(c-1/2)(a_1^2+a_2^2)\ge a_1^2+a_2^2$ in general. Now we know that

$$a_1a_2=(c-1/2)(a_1^2+a_2^2)\ge a_1^2+a_2^2$$

$$a_1a_2\ge a_1^2+a_2^2$$

$$a_1a_2-2a_1a_2\ge a_1^2 -2a_1a_2+a_2^2$$

$$-a_1a_2\ge (a_1-a_2)^2$$

$$-a_1a_2\ge (a_1-a_2)^2\ge0$$

$$-a_1a_2\ge0$$

$$a_1a_2\le0$$

combine this with $a_1^2+a_2^2\le a_1a_2$ to get

$$a_1^2+a_2^2\le a_1a_2\le0$$

$$a_1^2+a_2^2\le0$$

A sum of squares can't be negative so $a_1^2+a_2^2=0$ which means that $a_1=a_2=0$. We started with the assumption that $c\gt1.5$ so

$$c>1.5 \implies a_1=0 \;\text{and}\; a_2=0$$

$$a_1\ne0 \;\text{or}\; a_2\ne0 \implies c\le1.5$$

Let me know if something's wrong with this argument; if it's correct, can it be used to find $f(x)$ or prove it doesn't exist?

Best Answer

Let $N$ be the first $n$ such that $a_n\ne 0$. Then $\left(\frac 1N a_N\right)^2=c\cdot\frac 1N\cdot a_N^2$, so $c=\frac 1N$.

For each natural $n\ge N$ put $S_n=\sum_{k=1}^n a_n$ and $T_n=\sum_{k=1}^n a_n^2$. Then $\frac 1{n^2}S_n^2 =\frac cn T_n=\frac 1{nN} T_n$, that is $S_n^2=\frac nN T_n$. But $S_{n+1}=S_n+a_{n+1}$, $T_{n+1}=T_n+a_{n+1}^2$, so $$(S_n+a_{n+1})^2=\frac{n+1}N(T_n+a_{n+1}^2)=$$ $$\frac{n+1}N(S_n^2\frac{N}n+a_{n+1}^2)=\frac {n+1}n S_n^2+\frac {n+1}N a_{n+1}^2.$$

It follows $$n(n-N+1)a_{n+1}^2-2nNS_n a_{n+1}+NS_n^2=0,$$

so $$a_{n+1}=\frac{2nNS_n\pm\sqrt{4n^2N^2S_n^2-4n(n-N+1)NS_n^2}}{2n(n-N+1)}=$$ $$S_n\cdot \frac{nN\pm\sqrt{n(n+1)N(N-1)}}{n(n-N+1)},$$ and both sign choices are possible.

Moreover, we have $N>1$. Indeed, otherwise $N=1$ and $a_{n+1}=\frac{S_n}n$. Therefore $$a_{n+2}=\frac{S_{n+1}}{n+1}=\frac{a_{n+1}+S_n}{n+1}=\frac{a_{n+1}+na_{n+1}}{n+1}=a_{n+1},$$ so the sequence $(a_n)_{n\in\mathbb N}$ is constant, a contradiction.

Related Question