Find the maximum value of $n$(if exists) such that there exists a sequence $a_1,a_2,\ldots,a_n$ of positive integers such that for every $2\leq k \leq n$
$$\sqrt[k]{a_1^k+a_2^k+\cdots+a_k^k}$$
is itself an integer.
I know the sequence 3,4,5 for $n=3$ works, but I do not know anything for larger values.
If there is no maximum value, is there exist an infinite sequence having such a property?
This is not a complete answer, but is too long for a comment. The case $n=4$ entails solving the simultaneous system,
$$\begin{align} &x_1^2+x_2^2 = y_1^2\tag1\\ &x_1^3+x_2^3+x_3^3 = y_2^3\tag2\\ &x_1^4+x_4^4+x_3^4+x_4^4 = y_3^4\tag3 \end{align}$$
Solving $(3)$ in particular is no trivial matter. Fortunately, Jarek Wroblewski has a complete table of the 1009 primitive solutions with $y_3<220000$. After checking them, it turns out there is no subset of the terms $x_i$ such that $(1)$ or $(2)$ has solutions.
If indeed $n=4$ has solutions, then it should involve larger terms.
P.S. Incidentally, there is the curiosity,
$$15935^2 + 27022^2 + 57910^2 + 59260^2 = 88597^2$$
$$15935^4 + 27022^4 + 57910^4 + 59260^4 = 70121^4$$
though this is only one of its kind in the table.