Thursday, February 16, 2023

A proof of Pythagoras Theorem

Here is a potentially new proof of the Pythagoras theorem I discovered recently. I could not find any prior proofs like these (including in the cut-the-knot pythagorean proof dump), so if you have seen it somewhere, please let me know.





ABC is the right triangle with sides a,b,c.


AD is the angular bisector of CAB and DE is the perpendicular from D to AB.


CD = x, DB = a-x.

It is easily seen that triangles ACD and ADE are congruent and so AE = AC = b and BE = c-b


Area of ACD + Area of ADB = Area of ABC gives

$bx + cx = ab $

And so $x = ab/(b+c)$

Now triangles DEB and ABC are similar and so

$$DE/AC = BE/BC$$

i.e.

$$x/b = (c-b)/a$$


$$a/(b+c) =(c-b)/a$$

Which gives

$$ a^2 = c^2 - b^2$$




Thursday, February 9, 2023

Base b and generating functions

 Not a puzzle, just a quick observation noting the power of generating functions.


Say $b \ge 2$ is a positive integer. We give a quick proof using generating functions that every positive integer can be written uniquely in base $b$ with digits $0, 1, \dots, b-1$.


Let $n \ge 1$. Consider 

$$ G(x) = \prod_{k=0}^{n} (1 + x^{b^k} + x^{2b^k} + \dots + x^{(b-1)b^k})$$

Observe that the coefficient of $x^N$ shows the numbers of ways of writing $N$ is base $b$.

Now if $u = x^{b^k}$, then

$$ (1 + x^{b^k} + x^{2b^k} + \dots + x^{(b-1)b^k}) = (1 + u + u^2 + \dots u^{b-1})  = \frac {1 - u^b}{1-u}$$


Thus

$$G(x) = \frac{1-x^b}{1-x}\frac{1-x^{b^2}}{1-x^b}\frac{1-x^{b^3}}{1-x^{b^2}}\dots\frac{1-x^{b^{n+1}}}{1-x^{b^n}}$$


This telescopes to


$$ G(x) = \frac{1 - x^{b^{n+1}}}{1-x}$$

$$ = 1 + x + x^2 + \dots + x^{b^{n+1} - 1}$$

Thus every integer $N$ in the range $1$ to $b^{n+1} - 1$, can be written in base $b$ using at-most $n+1$ digits, taken from $0,1,2, \dots, b-1$. Since the coefficient of $x^N$ is $1$, the representation is unique.