Why is the following for $B= A^x -(A-1)^x-(A-2)^x-(A-3)^x...(A-n)^x$ as long as $B ≥ 0$?

110 Views Asked by At

As a web developer that programs in PHP, on my free time I like to run some math algorithms to see the wonder of math.

In this experiment, I wanted to check the final results for $B= A^x -(A-1)^x-(A-2)^x-(A-3)^x...(A-n)^x$ as long as $B ≥ 0$

I will list my "findings" in the following before addressing my question:

When $x=2$: and starting with $A=2$

$4 - 1 = 3$

$9 - 4 - 1 = 4$

$16 - 9 - 4 - 1 = 2$

$25 - 16 - 9 = 0$

$36 - 25 = 11$

$49 - 36 = 13$

$64 - 49 = 15$

...

  • Notice: when $A = 5$ meaning $25 - 16 - 9 = 0$ we get $B=0$

  • Notice: according to my script and fist $1000$ results, starting $36−25=11$ (number $5$ on the list), $B$ always goes up and there are no more than one deductions before $B≥0$

When $x=3$: and starting with $A=2$

$8 - 1 = 7$

$27 - 8 - 1 = 18$

$64 - 27 - 8 - 1 = 28$

$125 - 64 - 27 - 8 - 1 = 25$

$216 - 125 - 64 - 27 = 0$

$343 - 216 - 125 = 2$

$512 - 343 = 169$

$729 - 512 = 217$

$1000 - 729 = 271$

...

  • Notice: when $A = 6$ meaning $216 - 125 - 64 - 27 = 0$ we get $B=0$

  • Notice: according to my script and fist $1000$ results, starting with $512 - 343 = 169$ (as a peak number $7$ on the list), $B$ always goes up and there are no more than one deduction before $B≥0$

When $x=4$: and starting with $A=2$

$16 - 1 = 15 $

$81 - 16 - 1 = 64$

$256 - 81 - 16 - 1 = 158 $

$625 - 256 - 81 - 16 - 1 = 271 $

$1296 - 625 - 256 - 81 - 16 - 1 = 317$

$2401 - 1296 - 625 - 256 - 81 - 16 - 1 = 126$

$4096 - 2401 - 1296 = 399$

$6561 - 4096 - 2401 = 64$

$10000 - 6561 = 3439$

$14641 - 10000 = 4641$

$20736 - 14641 = 6095$

...

  • Notice: according to my script and fist $1000$ results, starting with $10000 - 6561 = 3439$ (as a peak number $9$ on the list), $B$ always goes up and there are no more than one deduction before $B≥0$.

And it continues like this when $x>3$ ,,,

I understand that the proportion between consecutive numbers is decreasing as the numbers are growing, but it seems as every list begins with a small bump where $B$ and the amount of deductions is increasing for a bit, then decreasing, and then $B$ is increasing from there on consecutively while the amount of deductions is no more than one.

It seems as if the bumps last longer as $x$ grows bigger.

A) Is there any explanation for the bump and will it occur and grow for all $x$ as $x$ gets bigger?

B) Is $25 - 16 - 9 = 0$ and $216 - 125 - 64 - 27 = 0$ the only examples where $B=0$?

As a self learner I really don't know what I am searching for, so if this is a duplicate please close and refer.