Do the differences of perfect squares apply to perfect cubes and more?

830 Views Asked by At

I'm curious about a special property of squares. The difference between perfect squares starting from 0 are 1,3,5,7,9..., where each difference goes up by 2. I want to know if there are any patterns for perfect cubes or quartics. Are the differences in a pattern of some sort?

6

There are 6 best solutions below

5
On BEST ANSWER

For cubes $$\begin {array} &0&&1&&8&&27&&64&&125\\&1&&7&&19&&37&&61\\&&6&&12&&18&&24\\&&&6&&6&&6 \end {array}$$ Try it yourself for quartics. What do you find?

0
On

Look at the pattern of the differences of the differences and so on :)

0
On

For squares:

$$1$$

$$\begin{array}{cc} \color{red}{2} & \color{red}{2} \\ 1 & \color{red}{2} \end{array}$$

$$\begin{array}{ccc} \color{blue}{3} & \color{blue}{3} & \color{blue}{3} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} \\ 1 & \color{red}{2} & \color{blue}{3} \end{array}$$

$$\begin{array}{cccc} \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} & \color{green}{4} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} & \color{green}{4} \\ 1 & \color{red}{2} & \color{blue}{3} & \color{green}{4} \end{array}$$

$$\vdots$$

For cubes, where each array is a slice of the cube:

$$1$$

$$\left.\begin{array}{cc} \color{red}{2} & \color{red}{2} \\ 1 & \color{red}{2} \end{array}\ \ \right| \ \ \begin{array}{cc} \color{red}{2} & \color{red}{2} \\ \color{red}{2} & \color{red}{2} \end{array}$$

$$\left.\begin{array}{ccc} \color{blue}{3} & \color{blue}{3} & \color{blue}{3} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} \\ 1 & \color{red}{2} & \color{blue}{3} \end{array}\ \ \right| \ \ \left. \begin{array}{ccc} \color{blue}{3} & \color{blue}{3} & \color{blue}{3} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} \end{array}\ \ \right| \ \ \begin{array}{ccc} \color{blue}{3} & \color{blue}{3} & \color{blue}{3} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} \end{array}$$

$$\left.\begin{array}{cccc} \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} & \color{green}{4} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} & \color{green}{4} \\ 1 & \color{red}{2} & \color{blue}{3} & \color{green}{4} \end{array} \ \ \right| \ \ \left. \begin{array}{cccc} \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} & \color{green}{4} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} & \color{green}{4} \\ \color{red}{2} & \color{red}{2} & \color{blue}{3} & \color{green}{4} \end{array} \ \ \right| \ \ \left. \begin{array}{cccc} \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} & \color{green}{4} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} & \color{green}{4} \\ \color{blue}{3} & \color{blue}{3} & \color{blue}{3} & \color{green}{4} \end{array} \ \ \right| \ \ \begin{array}{cccc} \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \\ \color{green}{4} & \color{green}{4} & \color{green}{4} & \color{green}{4} \end{array} $$

$$\vdots$$

Count the number of elements of each color.

0
On

In general, the sequence is generated by a polynomial of degree $d$, then the sequence of the first differences is generated by a polynomial of degree $d-1$.

To see this, consider a polynomial $p(n)$ with leading coefficient $a$. It is easy to see that $p(n+1)$ also has degree $d$ and leading coefficient $a$. If the term of degree $d-1$ in $p(n)$ is $b$, then the corresponding coefficient in $p(n+1)$ is $b+ad$. Hence $q(n)=p(n+1)-p(n)$ has degree $d-1$ with leading coefficient $ad$.

As an example with the cubes ($n\geq 0$):

$p_0(n)=n^3$: generates $0,1,8,27,64,125,\ldots$

$p_1(n)=p_0(n+1)-p_0(n)=3n^2+3n+1$: generates $1,7,19,37,61,\ldots$

$p_2(n)=p_1(n+1)-p_1(n)=6n+6$: generates $6,12,18,24,\ldots$

$p_3(n)=p_2(n+1)-p_2(n)=6$: generates $6,6,6,\ldots$

0
On

In general, for an nth-order polynomial, if you calculate f(i) for equally-spaced values of i, then take the difference between adjacent results, and take the difference between those differences, and the differences between those differences, and so on, n times, you'll get a constant value.

So for a 2nd order polynomial such as f(x) = x^2, the second-order differences are all the same; in this case, 2, and the first-order differences for f(0), f(1), f(2), ... are 1, 3, 5, 7, ...

For a 3rd order polynomial such as f(x) = x^3, the third-order differences are all the same; in this case, 6; the second-order differences are 12, 18, 24, ... and the first-order differences are 7, 19, 37, 61... Not as pretty a pattern.

This is the basis for the method of differences, which was used for computing tables (such as logarithms) back in the days before computers; with a suitably chosen Taylor expansion, pretty much anything can be calculated with the method of differences. It has two big advantages over expanding a series directly: it doesn't require any multiplication, and every result depends on all the previous ones, so finding errors can be done by spot checking rather than checking every result.

Back in the first half of the 19th century, Charles Babbage designed a calculator that used 7th order differences to compute tables. It wasn't built in his lifetime, but ten or fifteen years ago the London Science Museum built one. More recently they built another, which you can see in operation at the Computer History Museum in Mountain View, CA.

0
On

Compare this with what happens in differentiation.

If you differentiate a polynomial function, then the degree drops by$~1$, and if it had degree$~n$ then the $n$-the derivative is a constant function, where the constant is $n!$ times the leading coefficient of the original polynomial. Similarly if you take a sequence given by a polynomial formula of degree$~n$, and you takes its "derived" sequence obtained by taking differences of successive terms and repeat that operation $n$ times, you get a constant sequence, where the constant is $n!$ times the leading coefficient of the original polynomial.

Then main difference is that for differentiation this is obvious by looking at what happens with individual terms of the polynomial ($ax^i$ differentiates to $ia^{i-1}$), but this is not so clear for the derivative sequence operation. However it does become obvious if one looks at what happens to the sequence whose terms are given by a so-called falling factorial power $n(n-1)(n-2)\ldots,(n-d+1)$ of degree$~d$: its difference sequence has terms given by $dn(n-1)\ldots,(n-d+2)$. This becomes nicer with the notation $n^{\underline d}$ for the falling factorial power: taking differences transforms $n^{\underline d}$ into $d\,n^{\underline{d-1}}$. Now if one writes polynomials as linear combinations of falling factorial powers rather than monomials (which is always possible), then it becomes clear why the behaviour described above takes place.

Applying this to the sequence $(n^3)_{n\in\Bbb N}$ gives the following. Using that $n^{\underline3}=n^3-3n^2+n$, $n^{\underline2}=n^2-n$ and $n^{\underline 1}=n$, one gets that $n^3=n^{\underline3}+3n^{\underline2}+n^{\underline1}$. Now, denoting by $\Delta$ the operation of taking successive differences, it follows that $$ \begin{align} (n^3)_{n\in\Bbb N} &=(n^{\underline3}+3n^{\underline2}+n^{\underline1})_{n\in\Bbb N} &&=(0,1,8,27,64,\ldots); \\ \Delta((n^3)_{n\in\Bbb N}) &=(3n^{\underline2}+6n^{\underline1}+1n^{\underline0})_{n\in\Bbb N} &&=(1,7,19,37,61,\ldots); \\ \Delta^2((n^3)_{n\in\Bbb N}) &=(6n^{\underline1}+6n^{\underline0})_{n\in\Bbb N} &&=(6,12,18,24,30,\ldots); \\ \Delta^3((n^3)_{n\in\Bbb N}) &=(6n^{\underline0})_{n\in\Bbb N} &&=(6,6,6,6,6,\ldots). \end{align} $$