Series equations for exponents using individual digits - $[abc]^2 = 10^4(a^2) + 10^3(2ab) + 10^2(b^2+2ac) + 10(2bc) + c^2$

44 Views Asked by At

I hope I'm asking this question in a good way.

I would like to ask what this method I found is called. It seems to have some relationship to either combinatorics/ matrix multiplication which I have not yet fully learned. I'm also wondering if there's a more efficient and elegant way to write this equation, or if it's entirely unnecessary since it's a purely inefficient way to calculate exponents.

On and off, I've been figuring out some strange equation patterns for powers of numbers using the relationship between individual digits and the answer. Here's an example for squares:

$[abc]^2$, where $a$ = hundreds, $b$ = tens, $c$ = ones is:

$10^4(a^2) + 10^3(2ab) + 10^2(b^2+2ac) + 10(2bc) + c^2$

For example, $241^2 = 40000 + 16000 + 2000 + 80 + 1 = 58081$

I started with $2$ digits which results in $ab^2 = 10^2(a^2) + 10(2ab) + b^2$, and figuring out the pattern for 3 digits was pretty challenging, but once there, i was able to see the pattern for any $n$ digits for squares.

$[abcdefgh]^2 = 10^{14}(a^2) + 10^{13}(2ab) + 10^{12}(b^2 + 2ac) + 10^{11}(2ad + 2bc) + 10^{10}(c^2 + 2ae + 2bd) + 10^9(2af + 2be + 2cd) + 10^8(d^2 + 2ag + 2bf + 2ce) + 10^7(2ah + 2bg + 2cf + 2de) + 10^6(e^2 + 2bh + 2cg + 2df) + 10^5(2ch + 2dg + 2ef) + 10^4(f^2 + 2dh + 2eg) + 10^3(2eh + 2fg) + 10^2(g^2 + 2fh) + 10(2gh) + h^2$

I won't compute an example for obvious reasons, but the pattern is clear and can be used for any amount of digits.

I was also able to use this method to approximate the square roots of numbers, but I always encounter an error at the fifth decimal place. I won't go into details about this as it's an extremely rough and unrefined process.

Additionally, I was able to find the equation for cubic and quartic exponents to two digits

$[ab]^3 = 10^3(a^3) + 10^2(3a^2b) + 10(3ab^2) + b^3$

$[ab]^4 = 10^4(a^4) + 10^3(4a^3b) + 10^2(6a^2b^2) + 10(4ab^3) + b^4$

Any input or information would be greatly appreciated. I've been itching to know what this is for years.

1

There are 1 best solutions below

0
On

Welcome to MSE! I'm not sure why people are voting to close your question, sure it's not written as precisely as one might like, but I don't know how people expect someone to ask a clear question when they aren't sure what they're even looking for...

Regardless, here is one avenue you might want to pursue.

As you've noticed, when we write $[abc]$, what we mean is $a \cdot 10^2 + b \cdot 10 + c$. For a longer example,

$$[abcdefg] = a \cdot 10^6 + b \cdot 10^5 + c \cdot 10^4 + d \cdot 10^3 + e \cdot 10^2 + f \cdot 10 + g$$

Now for the key insight. This looks like a polynomial, where we've plugged in $x = 10$. So we can think about our number $[abcd]$ as being the polynomial $ax^3 + bx^2 + cx + d$ evaluated at $x=10$.

This is not an idle insight! For instance this observation lets computers multiply large numbers by instead multiplying these polynomials (which is faster, via the fast fourier transform) and then evaluating at $x=10$.

Now, after this insight, the problem becomes "routine". If we want to square $[abc]$, then your formulas come from squaring $ax^2 + bx + c$, then evaluating at $x=10$. So, given a polynomial $p(x)$ we become interested in calculating the coefficients of $p^2$ from the coefficients of $p$. This, as you might guess, is a well studied problem, and the solution comes from cauchy products.

If we have a number $[a_n a_{n-1} a_{n-2} a_{n-3} \ldots a_2 a_1 a_0]$ (that is, a polynomial $\sum_{k=0}^n a_k x^k$ evaluated at $x=10$) then your formulas for $[a_n a_{n-1} a_{n-2} a_{n-3} \ldots a_2 a_1 a_0]^2$ will be given by the coefficients of $\left ( \sum_{k=0}^n a_k x^k \right )^2$. But the $x^k$ coefficient of this square (that is, the $10^k$ term in your formula) is given by

$$ \left ( \sum_{x+y = k} a_x a_y \right ) 10^k $$

It's worth checking that this really does agree with the formulas you derived yourself!


But now that we have this machinery, it seems silly to stop so soon... You said you've figured out how to compute $[ab]^3$. But what about $[abcd]^3$? This pattern is substantially less easy to spot, but this is the real power of mathematics and abstraction! Now that we have this idea about polynomials, we might suspect that someone before us has computed cauchy products for higher powers. And indeed they have!

In general, we get this (aesthetically pleasing) formula: The $x^m$ coefficient of $\left ( \sum_{k=0}^n a_k x^k \right )^3$ is $\sum_{x+y+z = m} a_x a_y a_z$.

Then the $x^m$ coefficient of $\left ( \sum_{k=0}^n a_k x^k \right )^4$ is $\sum_{w+x+y+z = m} a_w a_x a_y a_z$.

Can you guess what the $x^m$ coefficient (that is, the $10^m$ term in your formulas) should be for any exponent $r$: $\left ( \sum_{k=0}^n a_k x^k \right )^r$? Can you prove it?


This machinery lets us make predictions, which we can then check by hand! For instance, let's go back to $[abcd]^3$.

We write this as $\left ( a x^3 + b x^2 + cx + d \right )^3$, which we'll have to evaluate at $x=10$ at the end. But our formula for the cauchy product of three sums tells us the answer!

$$ (a^3) x^9 + \\ (a^2 b + a b a + b a^2) x^8 + \\ (a b^2 + b a b + b^2 a + a^2 c + a c a + c a^2) x^7 + \\ \ldots \\ (c d^2 + d c d + d^2 c) x^1 + \\ (d^3) x^0 $$

Do you see how this formula follows from the discussion of cauchy products earlier? Can you verify that this formula really is correct? It might be helpful to name your digits $[a_3 a_2 a_1 a_0]$ instead of $[abcd]$ to really see the pattern.


I hope this helps ^_^