The strand puzzle
house numbers¶
First things first, I have to copy the strand puzzle word for word, having the same punctuation, same capitalization, and same timing for pressing enter, and here it is
"There is a man who lives on a long street, numbered on
his side one, two, three, and so on, and that all the
numbers on one side of him added up exactly the same
as all the numbers on the other side of him.
.
He said he knew there was more than
fifty houses on that side of the street, but not so many
as five hundred."
just to clarify, there are no houses on the other side of the street, and the house numbers don't skip any. To solve the puzzle, you find the number of his house, and the total number of houses on the street / number of the last house on the street, and that one is in between \(50\) and \(500\). For future reference, I will call those unknowns \(x\) and \(y\) respectively. When someone gave ramanujan (I'm a big fan of him by the way), he (supposedly) solved it in under \(10\) seconds.
calculation¶
also, because it is against MY rules to use something that I haven't derived (which is why the polynomial page has more than \(10\) lines), and why most of the contents of this website are derivations), first I will derive the formula for the sums of integers using discrete calculus
the formula for the sums of integers (I couldn't find a better name)¶
putting it all together¶
back to the strand puzzle or whatever I was doing because I don't remember¶
now I can find formulas for the sums of house numbers and say that they are equal. The first starts at \(1\) and stops at \(x - 1\), so the formula is:
Now, for the second formula, there are two methods. If I say "ao!", then forget the last \(2\) lines, if i say "oa!", than remember them. With that being said...
one method is to pull out an \(x\) at each of the \(y - x\) steps, which amounts to an addded \(x(y - x)\), so it is:
ao!
one method is to realize that this is the difference between the first \(y\) houses and the first \(x\) houses, so it is:
oa!
you can probably tell that the first was made by me, but time for some algebra!
Bit more!
Which you might (but probably don't) know as the...
pell equation¶
But that is besides the point. The pell equation can be rearanged into \(Y = \sqrt{2X^2 + 1}\), then plug in values for \(X\) until \(Y\) is an integer. Doing this, (and remembering to divide by \(2\) and take the floor), I'll list the solutions that we get.
Just barely misses!
There it is!
in genaral¶
the real soluion would be a formula for the \(n\)'th solution to the strand puzzle droppng the second rule, it is a bit tedious to check using this method and someone probably would have used the formula and this wouldn't work. I usually don't tell you the video that this page is built on, but this time, you would notice that it takes a completely different method. So yes, I built the rest of this page from the ground up.
Something that is easy to notice but hard to prove is that the bigger the \(X\) and \(Y\), the better the approxamation of \(\sqrt{2}\), so I will conjecture the following: Any ratio \(\frac{Y}{X}\) for \(X\) and \(Y\) solving the pell equation*, is closer to \(\sqrt{2}\) than any other fraction with denominator less than or equal to \(X\).
*The numbers \(X\) and \(Y\) could solve the alternitave \(Y^2 - 2X^2 = - 1\) that alternates with the pell equation as \(X\) and \(Y\) get bigger, so instead of the pell equation, from now on, it is more like \(|Y^2 - 2X^2| = 1\).
By the way, the conjecture was an "I'll leave this as an exersize for the veiwer", and I made up the proof as I went.
Proof (by contradiction): Let's say that there is a fraction \(\frac{b}{a}\) that is a better approxamation of \(\sqrt{2}\) than \(\frac{Y}{X}\) with \(a\) strictly less than \(X\). \(X\) and \(Y\) solve \(|Y^2 - 2X^2| = 1\), and \(X\) is the next biggest solution than \(a\). Well, what is \(|b^2 - 2a^2|\)? By the thing that is easy to notice but hard to prove, even if \(|b^2 - 2a^2| = 1\), it still dosen't work, so \(|b^2 - 2a^2| \neq 1\), and by the fact that \(\sqrt{2}\) is irrational* (I'll prove that later), \(|b^2 - 2a^2| \neq 0\), and by the fact that \(a\) and \(b\) are integers, \(|b^2 - 2a^2| = an\) \(integer\). So \(|b^2 - 2a^2|\) is an integer, does not equal \(0\), and does not equal \(1\). But the closer to \(1\), the better the approxamation (unless the numbers are is bigger). Thus, the proof is complete!
If \(a = X\), than \(|b^2 - 2a^2| = |b^2 - 2X^2|\). If \(b = Y\), than I can ignore that case because \(\frac{Y}{X}\) cannot be a better approxamation of \(\sqrt{2}\) than \(\frac{Y}{X}\). So if \(b < Y\), \(b^2 < Y^2\) * , so \(|b^2 - 2X^2|\) also is not \(1\).
( ) If \(a\), \(b\), \(X\), and \(Y\) are all negatave, than \(b^2 > Y^2\). But for one, if they are both negatave, then they are not in reduced fractions. And for another, if one is negatave, than the whole thing is negatave, and \(\sqrt{2}\) is not. Also if \(b > Y\) (yes, it was only a constraint on \(a\) and not \(b\)), than it still wouldn't work.
** Warning! I will swap \(a\) and \(b\) in this proof: Note that an even number is two times an integer, if the square of a number is even, than the number that is being squared is even, and a ratio of two even numbers is not in reduced form. You can derive these because I am too busy writing this proof down. Lets say that a fraction \(\frac{a}{b}\) in lowest terms (that will be important in the contradiction part of proof by contradiction) that equals \(\sqrt{2}\). Going back, this means that \(a^2 = 2b^2\). But \(b^2\) is an integer, so \(a^2\) is even, so \(a\) is even. if \(a\) is even, than lets say that \(a = 2m\) for some integer \(m\), \(a^2 = 4m^2\), so \(4m^2 = 2b^2\), so \(2m^2 = b^2\). But \(m^2\) is an integer, so \(b^2\) is even, so \(b\) is even, so \(a\) and \(b\) are both even, but if they are both even, (and if you remembered), this is a contradiction!
Side note! With this proof, you can prove the thing that is easy to notice but hard to prove, but this would be a circular argument, because we need it to be true for it to be true. To this day, I haven't found a proof of this fact. But if I do, then you know the drill by now, I'll write the proof here and put this in quotation marks.
Now, the proof is finally complete! Where was I again?
Time to keep going¶
But the calculations that I did earlier still work, so
So like I said, solutions for the pell equation and inverse pell equation alternate.
Okay, this actially happend: I was soving the strand puzzle and got up to this point. I met someone new, and naturally, I opened with how I got here and where I was with the strand puzzle. She said "can you prove that this is the next solution to the pell equation", and I said "I'm too tired fot that". My point is that you shold just run with it.
From now on, \(X\) will be replaced with \(X_n\), \(Y\) will be replaced with \(Y_n\), \(\hat{X}\) will be replaced with \(X_{n + 1}\), \(\hat{Y}\) will be replaced with \(Y_{n + 1}\), \(X_N\) will be replaced with \(X_{n + 2}\), and \(Y_N\) will be replaced with \(Y_{n + 2}\). this is because it will look more like a formula on \(n\) when you solve for \(Y_n\) as appose to \(Y\). Also these can be solutions to the inverse pell equation. For the pell equation, I want to have a \(2n\), so it has to be the inverse pell equation first, an easy answer is
and the first solution to the strand puzzle is \(1 \quad 1\), so \(2 \quad 3\) falls out of that, you can verify this solution yourself (you might recognize \(\frac{17}{12}\) from the mathologer video, it translates to \(6 \quad 8\) considered as the first real solution, but we’ll get there), so
and because of the recurance...
The final dash in the silaspe marithon (yes, that is a referance to mathologer marithon)¶
For now, I will just copy some text from the fibbonacci page, and minipulate it.
The final step in the silaspe marithon¶
You might recognize these two formulas from the mathologer video thit I showed you earlier. Around half of the page after and including the "in genaral" chapter was improv, including things like "the proof". The only things that weren't improv were the result for \(X_n\), the proof was using*, the other thing was the reccurance relation, I used a reccurance relation that went backwards, but it still counts. You can use these formulas (that I'll write down) for solutions for \(x_n\) and \(y_n\) (I bet that you forgot about them). I forgot to tell you that \(x_n\) and \(y_n\) are the \(n\)'th solutions to the strand puzzle respecively. Another thing to notice is that on the github repo, this is the \(395\)'th line, this is already the longest page so far, but from now on, if I reach \(400\) lines, I'll write down "\(400\) lines!!".
*Bunnymatics, a study of the population of immortal bunies. They can be a child, or an adult. Each day, the child bunnies turn into adult bunnies, and the adult bunnies asexually reproduce and then clone themselves (probably an adult thing). Day one, there is one adult bunny. if you give the bunnies price of \(1\) for child bunnies and price \(c\) for adult bunnies, one more day is multiplying the price by \(c\)
\(400\) lines!!!!!!