The ingredient you're missing is that if $k+1=\prod_{i\in S}p_i^{A_i}=\prod_{j\in T}q_j^{B_j}$ then$$p_i|k+1=\prod_jq_j^{B_j}\implies\exists j\in T(p_1|q_j)$$where $\implies$ needs a proof by induction on $m:=\sum_jB_j$ of the fact that, if a product of $m$ integers is divisible by a prime $p$, at least one factor is. Hence if $k+1$ has multiple prime factorizations so does $(k+1)/p\le k$, contradicting the null hypothesis.
In case the proof of this theorem about $m$ products is unfamiliar, we proceed as follows:
- $m=1$ is trivial;
- We also include $m=2$ in the base case, proven below;
- If it works for $m=\ell$, a product of $\ell+1$ factors is a product of $2$ factors, the first $\ell$ & the last one, so $m=2$ completes the inductive step.
Soo $m=2$ is the hard part. If $p=uv$ but $p\nmid u$, there are integers $x,\,y$ with $xp+yu=1$ by Bézout's lemma. So $p|xpv+yuv=p$ (because $p|uv$).
We're trying to find a strictly increasing set of integers $a_i$, with $a_1 \ge 2$, so for all $k \ge 1$
$$\sum_{i=1}^{k}a_i \, \mid \, \sum_{i=1}^{k}a_i^2 \tag{1}\label{eq1A}$$
Unfortunately, I don't know of any way to finish what you've tried. Instead, as you surmised, there's an inductive solution. For $k = 1$, \eqref{eq1A} is true since $a_1 \mid a_1^2$. Assume that, for some $m \ge 1$, \eqref{eq1A} is true is for $k = m$. Set
$$j = \sum_{i=1}^{m}a_i \tag{2}\label{eq2A}$$
Thus, by \eqref{eq1A}, since $a_1 \ge 2$, we have
$$\sum_{i=1}^{m}a_i^2 = jn, \; \; n \ge 2 \tag{3}\label{eq3A}$$
Let
$$a_{m+1} = j(n + j - 1) \tag{4}\label{eq4A}$$
Since $n \ge 2$ and $j \ge 2$, then \eqref{eq4A} and \eqref{eq2A} give that $a_{m+1} \gt j \; \; \to \; \; a_{m+1} \gt a_{m}$. Using $k = m + 1$ in \eqref{eq1A}, the LHS becomes
$$\sum_{i=1}^{m+1}a_i = j + j(n + j - 1) = j(n + j) \tag{5}\label{eq5A}$$
The RHS of \eqref{eq1A} is then
$$\begin{equation}\begin{aligned}
\sum_{i=1}^{m+1}a_i^2 & = jn + [j(n + j - 1)]^2 \\
& = j(n + j\,[(n+j) - 1]^2) \\
& = j(n + j\,[(n+j)^2 - 2(n+j) + 1]) \\
& = j(n + j\,[n+j][n+j-2] + j) \\
& = j(n+j)[1 + j(n+j-2)]
\end{aligned}\end{equation}\tag{6}\label{eq6A}$$
From \eqref{eq5A}, the LHS divides the RHS of \eqref{eq1A}, so it's true also for $k = m + 1$. Thus, by induction, we have \eqref{eq1A} is true for all $k \ge 1$.
Best Answer
We will use proof by contradiction to show that all $a_{1},...,a_{k}$ are $0$.
W.L.O.G we may assume $a_{k}$ is non-zero .
Let $d$ be the largest integer $\geq 0$ so that $p_{k}^{d}|a_{k}$.
Consider $$S(-d-1) = a_{k+1}+\sum_{j=1}^{k}a_{j}p_{j}^{-d-1}$$
Note that $S(-d-1)$ is of the form $\frac{u}{v}$ with $\gcd(u,v) = 1$, $p_{k}|v$ and $p_{k}^2$ does not divide $v$. Also observe that $S(-d-1)$ is a quadratic residue modulo each prime $q$ where $q \neq p_{j}$ ($j = 1,...,k$) as if we choose $t \in \mathbb{N}$ so that $-d-1+(q-1)t \geq 1$ we have
$$S(-d-1)\equiv a_{k+1}+\sum_{j=1}^{k}a_{j}p_{j}^{-d-1} \equiv a_{k+1}+\sum_{j=1}^{k}a_{j}p_{j}^{-d-1+(q-1)t} \equiv S(-d-1+(q-1)t) \mod q$$
Since $S(-d-1+(q-1)t)$ is a square, $S(-d-1)$ is a square $\mod q$ by the above modular equation.
Thus if we show that $S(-d-1) =\frac{u}{v}$ is not a quadratic residue modulo some prime $q \neq p_{j}$ $(j = 1,...,k)$ we will have a contradiction. We will obtain this contradiction when we use the quadratic reciprocity theorem and Dirichlet's theorem of primes in arithmetic progressions. Let us continue the proof;
Note that by the above discussion we can perform prime factorization on the numerator and denominator of $S(-d-1)$
$$S(-d-1) = \frac{u}{v} = \frac{(\text{square})r}{(\text{square})sp_{k}}$$
where $r$ and $s$ are square-free and $p_{k}$ is coprime to all primes in the numerator and denominator with the exception of itself. By quadratic reciprocity theorem there exists $\alpha_{r},\alpha_{s},\alpha_{k}$ with $(\alpha_{r},r) = 1$, $(\alpha_{s},s) = 1$ and $(\alpha_{k},p_{k})=1$ so that if a prime $q$ which satisfies
$$q \equiv \alpha_{r} \mod r$$
$$q \equiv \alpha_{s} \mod s$$
$$q \equiv \alpha_{k} \mod k$$
$$q \equiv 1 \mod \frac{\prod_{j=1}^{k}p_{j}}{\gcd(rsp_{k},\prod_{j=1}^{k}p_{j})}$$
then $S(-d-1)$ is not a quadratic residue modulo $q$. But primes such as $q$ exist due to Chinese remainder theorem (we can solve the above congruence with solution $\alpha \mod \beta$ with $(\alpha,\beta) = 1$) and Dirichlet's theorem on primes in arithmetic progression. This is a contradiction as this would mean $S(-d-1+(q-1)t)$ is never a square whenever $t \in \mathbb{Z}$.