TITLE: Can a sum of consecutive $n$th powers ever equal a power of two?
QUESTION [27 upvotes]: Let $n,u,m\in \mathbb{N}$
$n_{u,m}$ is a number defined  as
$$n_{u,m}= n^m+(n+1)^m+(n+2)^m+...+(n+u)^m$$
$$= \sum_{i=0}^{u}(n+i)^m$$
example: $3_{2,4}=3^4+(3+1)^4+(3+2)^4=962$
Question: Is the following claim true?


Show that $2^t$ cannot be written in $n_{u,m}$ 
$$n_{u,m} = \sum_{i=0}^{u}(n+i)^m \ne 2^t \ \ \ \ \ \forall n,u,m,t\in \mathbb{N}$$


Generalization of above problem

Let $d$ be any odd positive integer then show that

$$\sum_{q=0}^{u}(n+qd)^{m}\ne 2^t \ \ \ \ \forall n,u,m,t\in\mathbb{N}$$


I proved for $n_{u,1}$ and $n_{u,2}$ never equals a power of two.

Proof for $n_{u,1}\ne 2^t$

Proof
Let suppose $$n_{u,1} = n+(n+1)+...+(n+u)$$ 
$$=\frac{(u+1)(2n+u)}{2}= 2^t$$
So  $$ (u+1)(2n+u)= 2^{t+1}$$
Case$1$: $u$ is $odd$
Then $u+1= even$ and $2n+u = odd$ it implies $ even×odd \ne 2^{t+1}$ because $  2^{t+1}$ content only $even$ multiples except $1$ and $2n+u>1$.
Case$2$: $u$ is $even$
Then $u+1= odd$ and $2n+u = even$ it implies $odd×even \ne 2^{t+1}$ similarly as case1
So both cases shows complete proof for $n_{u,1} \ne 2^t$ 
Note
By using Newton's interpolation method, we can calculate formula for $n_{u,m}$. I write the general formula at bottom of the post.
So $$ n_{u,2}=n^2(u+1)+(2n+1)\frac{(u+1)u}{2} +\frac{(u+1)u(u-1)}{3} \  \ \ \ \  \  ...eq(1)$$

Proof for $n_{u,2}\ne 2^t$

Proof
Let suppose $n_{u,2} = 2^t$
We can write $eq(1)$ as 
$$ (u+1)(6n^2+3(2n+1)u+2u(u-1))= 3×2^{t+1} \ \ \  \ ...eq(2)$$
Case$1$: $u =even$
$\implies u+1 = odd$
$\implies u+1=3$ $\ \ \ $ By $eq(2)$
$\implies 3n^2+3(2n+1)+2=2^{t}=even$
But we know, if $n$ is $even$ then $3n^2+3(2n+1)+2\ne even$
and if $n$ is $odd$ then $3n^2+3(2n+1)+2\ne even$
Hence it implies $3n^2+3(2n+1)+2\ne2^{t}$
Case$2$: $u =odd$
$\implies u+1=even=2^x$ for some $x$.
$\implies 6n^2+3(2n+1)u+2u(u-1)= even=3×2^y$ for some $y$.
Where $2^x2^y=2^{t+1}$
$\implies 2n+1= even$, which is not true.
Hence both cases shows complete proof for $n_{u,2}\ne 2^t$


General formula for $n_{u,m}$
$$n_{u,m}=\sum_{i=0}^{m} \binom{u+1}{i+1} \sum_{j=i}^{m}\binom{m}{j}n^{m-j}\sum_{k=0}^{i}(i-k)^j(-1)^k\binom{i}k $$
Where $n\in \mathbb{R}$ and $u,m\in \mathbb{Z^*}$ and $0^0=1$

Moreover if we put $n=0$ then
$$0_{u,m}=\sum_{l=0}^{u}l^{m}$$
$$=\sum_{i=0}^{m}\binom{u+1}{i+1}\sum_{k=0}^{i}(i-k)^i(-1)^k\binom{i}k $$

Edit:
  $$\sum_{q=0}^{u}(n+qd)^{m}=\sum_{i=0}^{m} \binom{u+1}{i+1}\sum_{j=i}^{m}\binom{m}{j}n^{m-j}d^j\sum_{k=0}^{i}(i-k)^j(-1)^k\binom{i}k $$
Proof

Yes, It is a bit complicated but I believe it is true.
I may not have tried much that you could reject using counter example

REPLY [2 votes]: Here it is a code for testing. You can copy and paste it (overriding everything) into 
https://www.onlinegdb.com/online_c++_compiler
And try a few cases by clicking the green "run" above and writing in the black screen below. The code gives the real answer if the sum has less than ~$18$ digits, otherwise it only checks if the sum has a factor $2^{60}$ (which is a first approximation).

#include <iostream>
#include <cmath>
using namespace std;

long long int modpow(long long int a,long long int b,long long int n) {
    if (b==0) return 1;
    if (n <= 1) return 0;
    if (b==1) return a%n;

    if (b%2 == 0) {
        return (modpow(a,b/2,n)*modpow(a,b/2,n))%n;
    } else {
        return (modpow(a,(b-1)/2,n)*modpow(a,(b-1)/2,n)*a)%n;
    }
}

int main()
{   
    long long int n,u,m;
    cout << "Please enter the value for n" << endl;
    cin >> n;
    cout << "Please enter the value for u" << endl;
    cin >> u;
    cout << "Please enter the value for m" << endl;
    cin >> m;
    long long int s=0; 
    long long int i;
    long long int L = pow(2,60);
    for(i=1; i<=u;i++) {
        s+=modpow(n+i,m,L);
    }

    if( s== 0) {
        cout << "There is a veery good probability that it is a power of 2! You guessed it!" << endl;
    } else if (m*(log(u/2+n))+log(u)  < 60*log(2) )  {
        while (s %2 == 0) {
            s= s/2;
        }
        if (s > 1) {
            cout << " It is not a power of 2." << endl;
        } else {
            cout << "It is a power of 2! YOU ARE GREAT!" << endl;
        }
    } else {
        cout << "It is not a power of 2." << endl;
    }
    return 0;
}

To be honest, there's a small interval, i.e. $ \log_2(u) + m* \log_2(u/2+n) \le 60 \le \log_2(u) + m* \log_2(u+n) $ in which the computer says it is not a power of two, but it could be a power of two smaller than $2^{60}$. But dont worry. It wont happen :)