# Pythagoras number of $\mathbb{F}_p$

For a commutative ring $A$ and $a \in A$, define the length of $a$ as $$l(a) = \inf \lbrace n \in \mathbb{N} \mid \exists a_1, \ldots, a_n \in A : a = \sum_{i=1}^n a_i^2 \rbrace .$$ Let $\Sigma A^2$ be the set of all elements for which $l(a)$ is finite. The Pythagoras number of $A$ is defined as $$P(A) = \sup_{a \in \Sigma A^2} l(a) .$$ I assume (and am trying to prove) that $P(\mathbb{F}_p) = 2$, where $p$ is a prime number (different from 2) and $\mathbb{F}_p$ is the finite field of $p$ elements. I had hoped to be able to prove that there exists a generator $x$ of the multiplicative group of length $2$, in which case the result would follow from the well-known formula $$(a^2 + b^2)(c^2 + d^2) = (ac + bd)^2 + (ad - bc)^2 ,$$ but I've had no success so far. Any tips on how to continue? I'm looking for a relatively elementary proof, preferably without using quadratic forms.

Any element $a \in \mathbb{F}_p$ is a sum of two squares, since the sets $\{x^2 : x \in \mathbb{F}_p \}$ and $\{a-x^2 : x \in \mathbb{F}_p\}$ both have size $(p+1)/2$, so overlap.