This isn't homework but I want to know how to solve this problem and I don't know how to go about it...

This isn't homework but I want to know how to solve this problem and I don't know how to go about it. Can someone offer a solution or show the way?

I posted it yesterday and an user said k=xn+1 but didn't offer the way he came to this answer (and I don't think it's right anyway)

It's not given that P is prime by the way.

Thank you

(n^2-1)^p (n-1)^(p+1) is basically B*n + (-1)^(2p+1)

(use the binomial theorem if you need convincing)

so A = B*n + (-1)^(2p+1) +k

the only way n can divide A is if n divides k+(-1)^(2p+1)

which means there exists some integer m such as

mn = k+ (-1)^(2p+1)

This translates to k = mn + (-1)^(2p), for m being any integer.

Conversly, you can check that these values of k work.

What level of math would someone learn this at?

high school

Let's not forget that (-1)^(2p) = 1.

(-1)^(2p+1) = -1

that can help indeed.

how are you simplifying the use of the binomial theorem initially?



everything makes sense but the first line

That changes depending on where you're from. I could have taken calculus in high school if I cared enough about math.

northern US here
we did calculus but not this shit

I'll take a simpler case here bc I have to leave

(n-1)^p is the sum of n^j (-1)^(p-j), right?
in each term where j is not 0, you can factor by n.
The only term where that doesn't work is when j=0.
And that term is (-1)^p

transpose this into OP's question

french here
we do this in last year of high school

Assuming p is an integer, of course.

get a load of this dingus

IB Math SL here (in Leb if that counts for anything).
Did and finished calculus but not something like this

China here, i did this in pre school, all you fuckin beta scrubs

Why is the grammar in the pic so bad?

Did you make it just to post it here OP?

because its a HL topic you silly willy

you are overcomplicating the problem. Assuming p and n are always integers, If we say that n divides 0 (as 0 = 0*n), then we can produce every k which allows A to be divisible by n.
k = m*n - [(n^2 - 1)^p]*[(n-1)^p+1], where m can be any integer, including 0. This formula produces only cases where A is divisible by n, and every value of k such that A is divisible by n has a corresponding value of m. This is true because, if A = [(n^2 - 1)^p]*[(n-1)^p+1] + k is divisible by n, for some value of k, we have A = m*n = [(n^2 - 1)^p]*[(n-1)^p+1] + k. Subtracting from both sides, we get m*n - [(n^2 - 1)^p]*[(n-1)^p+1] = k.

[eqn] k \in -1 + n \mathbb{Z} [/eqn]