Skip to main content
edited title
Link
Cameron Buie
  • 103.7k
  • 9
  • 103
  • 226

Is there a way to find the answervalue of $1^n+ 2^n +\cdots + m^n$ modulo $x$?

Is there a way to find the answer of 1^n+$1^n+ 2^n ... m^n+\cdots + m^n$ modulo x$x$

I am writing a program in which I want to make changes to make it more efficient.

whatWhat the program does is it takes three inputs m n$m$, $n$ and x$x$ and I have to find the value of the following equation: (1^n+ 2^n ... m^n )modulo x$$ 1^n+ 2^n+\cdots + m^n \mod{x} $$

Is there a better way than calculating the whole value and then solving for answer? Because if n$n$ and m$m$ are large it takes a lot of computation time which I am trying to avoid.

Is there a way to find the answer of 1^n+ 2^n ... m^n modulo x

I am writing a program in which I want to make changes to make it more efficient.

what the program does is it takes three inputs m n and x and I have to find the value of the following equation (1^n+ 2^n ... m^n )modulo x

Is there a better way than calculating the whole value and then solving for answer? Because if n and m are large it takes a lot of computation time which I am trying to avoid

Is there a way to find the answer of $1^n+ 2^n +\cdots + m^n$ modulo $x$

I am writing a program in which I want to make changes to make it more efficient.

What the program does is it takes three inputs $m$, $n$ and $x$ and I have to find the value of the following equation: $$ 1^n+ 2^n+\cdots + m^n \mod{x} $$

Is there a better way than calculating the whole value and then solving for answer? Because if $n$ and $m$ are large it takes a lot of computation time which I am trying to avoid.

Source Link
Loading