I noticed something about the prime numbers:
Pick the number $2$. Then, add the first odd prime, namely $3$. The result is $5 = 1^2+2^2$. Notice that the exponents are also the number we picked.
Pick the number $4$. Add the first odd prime, then the second, and the third, all the way up to $71$. It follows that $$4+3+5+\cdots + 67+71=5^4 + 2^4.$$
I cannot find a number $n$ such that when you add all the $n$ odd primes together, and then add $6$ (the next even number from $4$) then the result is $x^6+y^6$ for $x,y\in\mathbb{Z}$. Does there exist a number $n$ for this specific case? Is there a more mathematical way of finding out as opposed to brute-force?
Thank you in advance.
Let's look at some heuristics.
Pick some x and y. Then start with six, add consecutive primes, until the sum is ≥ $x^6 + y^6$. In other words, 6 + sum of odd primes up to $p_{i-1}$ is less than $x^6 + y^6$, and adding 6 + sum of odd primes up to $p_i$ is ≥ $x^6 + y^6$.
Let d = (6 + sum of odd primes up to $p_i$) - $(x^6 + y^6)$. Obviously $0 ≤ d < p_i$, and we have a solution if d = 0. Heuristically, we assume that d could be any of the numbers from 0 to $p_i - 1$ with equal probability $1 / p_i$.
Let $z = x^6 + y^6$. The i-th prime is quite roughly equal to $i · log i$, the sum of the first i primes is quite roughly $i^2 · log i / 2$, which makes $i^2 · log i ≈ 2z$, $i ≈ 2 (z / log z)^{1/2}$, $p_i ≈ (z · log z)^{1/2}$.
The chance that there is a solution for x, y is about $1 / (z · log z)^{1/2}$. Assuming x ≥ y, this is about $1 / (x^3 · (6 log x)^{1/2})$. If we add this for $0 ≤ y ≤ x$, the sum is about $1 / (x^2 · (6 log x)^{1/2})$. The sum of $1 / x^2$ is just π / 6, this sum is smaller, maybe 1/4.
A program that checks all cases with x ≤ 100 and therefore $z < 2·10^{12}$ is doable and has a chance of finding a solution (rough estimate 25%). Above that it is quite possible that a solution exists, but it would be unlikely (I'd say probability about 0.17%), and a solution would be hard to find.
If you examined all cases up to x ≤ 10,000, that would be a ridiculous amount of work (finding all primes up to $2·10^{24}$), and the chance that you still missed a solution is still about 0.0003%.
So a brute force search adding the primes up to $2·10^{12}$ has a reasonable chance of finding a solution. But even if you process all primes up to $2·10^{24}$, there is still a non-neglible chance that there is a solution further out.