Is there an equation (or equations) for the sequence/s of odd numbers that are the result of the sum of two squares? (Not including 0^2 + n^2) For example: 5 13 17 25 29 37 41 45 53...? Where you put in 'n' and it gives you the number in the sequence?
I was yelling at my computer asking why the area wasnt being solved using pythagoras - and then he surprised me with it being a proof for pythagoras...
I really like the one without algebra, where you rearrange the four triangles to make two rectangles, where one on the top left corner horizontally, and the other is on the bottom right vertically. The rest of the square is made of a square of side "a" and a square of side "b".
8:52 It's amazing how Brady has developed a mathematician's mind after all these years of doing these vidoes. This is exactly the question a mathematician would ask
When I first found the channel, I had no idea he wasn't a maths guy, he really seemed to know. Of course after having watched many videos and having learned about the channel, I can now tell a bit he isn't originally a math guy. But you can also see he's getting a bit of a hang on it.
Ben Sparks is by far my favourite RU-vid mathematician. His knack for explaining things in a way that's easy to understand for pretty much anyone makes maths so much more accessible. I regularly rewatch his videos - would love to see him do even more videos on Chaos.
Peetzaahhh this was exactly what I was thinking. In my head I was shouting Pythagoras, but then realised the reason it wasn’t referenced was because it was being proved!
@Peter Attia when did you stop learning maths and how old are you? I'm asking a bunch of people in the comments because I'm assuming people who are amazed by this video must be about 11 years old or younger.
6:42 as soon as I saw this, I was like, "Ohhh of course! That's how you visualize the Pythagorean theorem! I should have seen that sooner!" Man, I love those ah ha moments.
Clue: This was filmed just before lockdown, when Covid-awareness was rising. It's the emergency escape in case the other person coughed unexpectedly. Hold breath while outclimbing the viral aerosols and on exit breathe out before inhaling. Luckily we subsequently thought of using masks.
If each grid point has a line orthagonal to the plane (representing a tree trunk), and you stood near the origin, can you see the horizon? If so, how much?
"suddenly there's this deep glimpse of maths that goes way beyond what they're ready for" you make it sound like math is some ancient forbidden arcane knowledge or something
Well, he’s talking about 9 year olds. I remember having those kinds of epiphanies, if only because the curriculum was geared specifically to lead down a logical path.
In 3D... Assume (0,0,0) is a vertex, and lattice point (a,b,c) is a vertex (with integers a,b,c >=0). The other two vertices on the cube 'adjacent' to the origin in the other two directions would need to be of the form (x,y,z) and satisfy ax + by + cz = 0 (perpendicular to (a,b,c) and (x^2) + (y^2) + (z^2) = (a^2) + (b^2) + (c^2) and x,y,z in the Integers At this point, I'm not entirely sure what method to use to show when you can find two suitable lattice points satisfying those conditions. But if you do, then you get the other four for free, as they're just adding together the vectors, and adding integers always yields integers. If you want to know what *integer* volumes of the cubes are possible, then you also are restricting your search to cases where sqrt(a^2 + b^2 + c^2)^3 is an integer, which only happens when sqrt(a^2 + b^2 + c^2) is an integer. In which case, your solution set is some subset of the cube numbers. However, all cubed integers are, by definition, formable on lattice points (just take the orthogonal points), therefore any solution that could theoretically be formed by a 'tilted' cube must also be formed by a non-tilted cube. Therefore, if you only want integer cube volumes, the solution is a trivial "All integers of the form s^3, where s is a positive integer.", as as any tilted cube on the lattice points must have a either a volume in that set, or a non-integer volume.
This video was excellently done, because in the first few minutes I had essentially watched the whole thing. The information was presented in a way which meant that I could easily jump ahead, and figure out the formulas and proofs on my own, without the explanation. It made all the math behind the problem jump out at me. As soon as I saw the triangles, I knew Pythagorean theorem was coming, so I tried it out, and the whole thing solved itself. I'm not the best at math, especially algebra (though I do love geometry), so props to this guy. Really intuitive way of teaching this.
"Which numbers are possible?" Ans: All the 2-square numbers; i.e., any number that's a sum of two squares. 0, 1, 2, 4, 5, 8, 9, 10, 13, 16, etc. Not 3, 6, 7, 11, 12, 14, 15, etc. Reason: once you draw one side of the square, the rest is determined (but allowing reflection across the initial side). That side must connect a pair of grid dots, the square of whose separation, s, is always a sum of two squares : s² = ∆x² + ∆y². But the square's area *is* just A = s² = ∆x² + ∆y² And of course, ∆x & ∆y are always integers. PS: The method he uses to prove Pythagoras is, I believe, due to James A. Garfield, when he was schoolteacher, before becoming 20th president of the US. PPS: The characterization of the 2-square numbers is based on characterizing primes in the ring of complex integers. [If you don't know what a mathematical ring is, don't pay it any mind - it isn't necessary; it just might help a little if you do know.] Warning: This gets a bit heavy, which is probably why it isn't in the video, so proceed at your own risk! Real primes can be sorted into 3 classes, modulo 4 [when dividing any integer by 4, the remainder is one of: 0, 1, 2, or 3; equivalently, 0, ±1, or 2]: There are no primes that are 0 mod 4. (i.e., no multiples of 4 are prime!) There's only 1 prime that's 2 mod 4; 2 itself. All others are ±1 mod 4 [I.e., 1 or 3 mod 4]. 2 can trivially be written as a sum of 2 squares: 2 = 1 + 1. Any number that is -1 mod 4, cannot, because all squares are 0 or 1 mod 4, so any sum of two of them can only be 0, 1, or 2 mod 4; never 3 == -1 mod 4. So among real primes, only 2, and the +1 mod 4 primes, can be written as a sum of 2 squares. It so happens that all +1 primes can be written as a sum of 2 squares - I'm not recalling the proof of that at this time. [I invite anyone who knows how to do that, to show it here!] So among the complex integers, the +1 primes are composite, being factorable into a product of 2 complex integers: p = a² + b² = (a + bi)(a - bi) while the -1 primes remain prime, because any product of 2 complex integers must be a conjugate pair in order for the product to be real; and such a product is necessarily a sum of 2 squares, which in turn, cannot be -1 mod 4. Now, the _coup de grace._ For complex numbers, the squared modulus [modulus = its "length"] of a product of them is the product of their squared moduli: w = u + vi; z = x + yi; wz = (ux-vy) + (uy+vx)i |w|² = u² + v² ; |z|² = x² + y² |w|²|z|² = |wz|² ; that is, (x² + y²)(u² + v²) = (ux-vy)² + (uy+vx)² . . . [This can be verified by simply expanding both sides.] Thus showing that a product of a pair of 2-square numbers is again a 2-square number. Now consider the prime factorization of any positive integer, N. Factor out any squares; that is, any prime, p, raised to a power ≥ 2, can be factored into p times an even power of p, which is thus p times a square. You now have N = one big product of squares, which itself is a square, times a product of single, distinct primes. If any of those distinct primes is -1 mod 4, N cannot be written as a sum of 2 squares; if none of them are -1 mod 4, N can be written as a sum of 2 squares. Thus, 3, 7, 11, 19, 23 cannot, being -1 primes; but neither can 6, 12, 14, 15, 21, 22, 24, 27, or 28, because of their prime factorizations. 0, 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, and 29 can each be written as a sum of 2 squares. Fred
Thanks for this! I think I mostly get it, except for the second to last (penultimate) paragraph: "If any of those distinct primes is -1 mod 4..." Cam you explain? So far, I get N has been factored into N = p*q*...*r*(a*b*...*c)^2 = pq...rA^2 where p,q,...r are primes and a,b,...c can be any integers, and A = a*b*...*c. Let pq...r be shorthand for p*q*...*r A^2 is a 1-square and is it trivially a 2-square since A^2 = 0^2 + A^2? Then using the fact that the product of a pair of 2-square numbers is itself 2-square, pq...rA^2 is a 2-square iff pq ..r is a 2-square? I think that's where my confusion arises because I don't know how modular classes behave under multiplication. As you mentioned the primes p,q, ..r have to be +/-1 mod 4. Does your conclusion (the penultimate paragraph) hinge on which mod 4 class the pq...r product is in? If you multiply two +1 mod 4 numbers, you get another +1 mod 4 number: (4k+1)(4j+1) = 4m+1 for some m But also if you multiply two -1 mod 4 numbers, you still get a +1 mod 4 number: (4k-1)(4j-1) = 4n+1 for some n To be exhaustive, if you multiply a -1 mod 4 number by a +1 mod 4 number, you get a -1 mod 4 number: (4k-1)(4j+1) = 4o-1 for some o So what would happen if p,q,..r had an even number of -1 mod 4 primes? E.g. if p,q,...r was just 3 and 7. Their product is 21 which is a +1 mod 4. Thanks for reading this far! Looking forward to your response and hopefully understanding what's going on. I'm really curious.
At 4:03, You can get numbers that are of the form a²+b², so 5 = 2²+1², 9 = 3²+0², and so on, but you can't write three as such. Edit: Yes!! I never knew such a simple problem could be so intricate and advanced!
@@judychurley6623 the two numbers are the sides of the triangles which creates the slant. If you have a 0 it just means that the triangle is just a straight line, so there's no slant
@@Seven-ez5ux The actual proof of the fact that a number can be expressed as a sum of two square if and only if its prime factorization contains no primes of the form 4k + 3 raised to an odd power.
@9:00 I love that you describe this as a problem that you personally have no intuition about. So often I see mathematicians and scientists talk about intuition as something that is universal, and so if they don't have a good intuition about something they're highly likely to write the entire human race off as having no intuition about it, which is astoundingly solipsistic really. So it deserves mention and respect that you did not fall into that pattern at all but demonstrated recognition that you are but one of many minds, and just because you lack knowledge or intuition about something does not imply that others necessarily would as well. To be perfectly clear, I also have absolutely no intuition about this particular thing, but I quite expect that some people do.
If you can’t express a number as a^2 +b^2 you can’t get a square of this area. It‘s because of the Pythagorean theorem where you get one size of the square is sqrt(a^2 +b^2 ) squaring which you‘d get the area. So the area is always a^2 +b^2 where a and b are natural numbers. Edit: Oh, I didn’t watched the video to the end. You mentioned it. Cool video :D
but lets ask the opposite question: for which integers can you find a pair of multiple solutions, like 0²+5² = 25 and 3²+4²=25. up to 1000 there are 6 integers, that can be written as the sum of two squares in 3 different ways, and i haven't found any number above that qith more pairs yet. and i haven't found any pattern in them either. here's the list: 325 425 650 725 845 850
There is a known formula given an "n" that gives how many pairs of a,b have a^2+b^2=n. 3blue1brown derives this formula in his video about pi/4=1-1/3+1/5-...
Another fun way to figure this out, is that you know that for any such "slanty square" lying anywhere in the real plane, you can fix one of the vertices on a lattice point and rotate the square about that point; if (and only if) somewhere along the way, one of the nearest vertices hits another lattice point, then you can do a slanty square of that area. This means that we can reduce the problem to finding lattice points on the circle of radius s, where s is the side length of the square; and s = sqrt(A). But the equation for the circle of radius r is x^2 + y^2 = r^2, so of course, this means we need to find integer solutions x^2 + y^2 = A!
This is why understanding which primes are sums of two squares is important. 3Blue 1Brown does an excellent video on this, showing why these are the only numbers that can't be expressed in this way.
@@anantkerur557 My intuition would be that instead of a grid of dots we would have a space of dots to work with. The area 3 square would have to be "lifted" in space by one of its corners into the complex axis I think.
@@diogor379 Intuition then fails us because even if we drew the imaginary part in a third dimension, the squares stretching into this would appear to grow with a growing imaginary part, but mathematically they should shrink.
I got really excited with the first few numbers in the string because they're adding the digits of pi after the initial 3. so 3 to 6 is '3', 6 to 7 is '1', 7 to 11 is '4', and 11 to 12 is '1'. unfortunately the pattern breaks after that, was hoping this would be another one of those odd ball "why the heck does pi show up here" strings. 3141 is still a fun coincidence, though.
Actually, you can get to Pi from this fact! That divisibility rule he shows can be used to count how many grid points are at a distance sqrt(n) from the origin. If you add up all the counts for n from 1 to some large integer R, you approximate the area of a circle of radius R. Using that 4k+1, 4k+3 only if odd rule, you can rearrange the count into the sum 1 - 1/2 + 1/3 - 1/4 + ... times 4 R², which means the alternating sum is equal to π/4. 3Blue1Brown has a more in depth walkthrough, I think it's called "Approximating Pi with Prime Numbers", but I might be wrong there.
I'm looking at this and the whole time I'm thinking hang on guys, why not just use Pythagoras? It's so obvious. Then "... do you realise we just prove Pythagoras?" - *Mind = Blown* Wow! Simple proof. Going around the complete oposite way as what I was expecting. Great work guys. Always love your videos!
It's literally only about which distances of points exist, having squares around just complicates the issue. And because of pythagoras, you can have all distances of the form sqrt(a^2+b^2), a,b>=0. And then your square sizes are just squares of these numbers, so a^2+b^2.
This is a direct corollary of Fermat's theorem on the sum of squares, which states that a prime number p is the sum of two integers squared x² + y² if and only if p ≡ 1 (mod 4).
This is beautiful. As you show, it has elements that can appeal to many ages. Once you know how to calculate the area of a right-angled triangle, you can calculate the area of a slanty square, and can at least collect possible and impossible areas. But there's non-trivial number theory there as well. Suggestions for further exercises: 1. Prove that if x and y are possible, so is xy. 2. Repeat the same exercise with equilateral triangles on a triangle grid. (The triangle whose sides are 1 counts as area 1.)
How to draw a square of area 3 using a grid of equally spaced dots: 1. Draw the smallest square you can on the grid. 2. Define the shortest distance between dots to be sqrt(3). 3. Laugh at the problem giver for not clearly specifying units.
This is a lot like the "Pi hiding in prime regularities" video of 3b1b, where one of the things he does in that video is check if a number can be expressed by the sum of 2 squares
My favorite proof for the Pythagorean Theorem ist one with a Torus. I saw it on the Dong Video "squaring a Doughnut" from Vsauce Michael. My 2. Favorite proof is the one from Garfield (the President) 'cause it's so clever.
Dbzfan _21 isn’t Garfield’s proof a generalized version of what is shown in this video? He used a trapezoid, more general case than a square. Although he broke the trapezoid down into two isosceles triangles and a scalene, not 4 right triangles and smaller square as done here, so I guess it is different... never mind.
So many questions popped into my brain while watching this(some of which were answered): 1. What method can I use to check to see if any number works? 2. Is there a visual pattern going on here? 3. Do the numbers that don't work get farther apart? 4. Are there any examples of where 3 in a row don't work or is 2 in a row the maximum? 5. Are there any other examples of where two integers in a row don't work? 6. Can this problem be extended into 3d space as well? This, by the way, is how math should be taught. Rather than simply dumping the pythagorean theorem on children (Here kid. Use this.) it would be far better to give them this type of problem to investigate which in turn leads them to the pythagorean theorem.
Whenever I'm stressed, I count letters on things, and I determine if the number of letters is 4K, 4K+1, 4K+2, or 4K+3 and it keeps my mind occupied. i rarely count the exact number, but only determine if its one of the 4 options
As a current engineering student, the moment he tried to calculate the area of the square, I was yelling in my head "just use the damm pythagorean theorem". A few minutes later I remembered how I used to watch numberphile way back in middle school when I still didn't know the pythagorean theorem and all the heavy math I know now, and only then I could appreciate the beauty and the art in the video. This video is intended for people like 14 year old me who didn't know that much math, but absolutely loved these kinds of problems. Thank you for keeping up the making of videos that motivate and introduce math outsiders into such a beautiful discipline.
I proved it using the abc conjecture and mock modularity with compact non-hausdorff manifolds on gauge symmetric Fermi propagators tensored with 10 dimensional vertical tangent space in U18, but the comment space is too small to contain it.
4:33 Since any square you make (after 2) would have a smallest square inside it, with four triangles around it, and triangles have an area of 1/2ab, and the areas of all four triangles would be 2ab, I'd say to make a square you'd have to be able to write the number as n^2+2m for some integers n,m
now farther along in the video, and of course, I should have known from the triangles :P ...and I've taken number theory, lol, I've probably even done this problem
I asked this question as a comment on a Numberphile video years ago. I'm going to go ahead and presume this video was made in response to that one comment of mine, of course. In which case, thank you! I love it!
I remember watching a video by 3blue1brown giving a proof for something where youd draw a circle with its center on the origin, and only with an integer radius and refering to where these circles intercect at an (integer,integer) pair. This is essentially the same question just with a slightly differnet spin but it was different in the way that the proof did not use pythagoran or 4k-1)^(2n-1) where k and n are integers, but used the fact that certain prime numbers can be writen in a+bi form that makes them not prime , for example, 13. 13x1 is the only real number pair but in imaginary there are four related ones. And they are (3+2i)x(3-2i) you get 9+6i-6i-4i^2 or 13 (also cuz 3^2 + 2^2) but 3,7, 11 etc cannot be writen as regular primes or as complex primes either. Ill see if i can find the video cuz if you like numberphile ull like 3blue1brown.
I was asked to prove Pythagoras' Theorem during a university entrance interview for Cambridge in 1982, and this is the way I did it! I think the interviewer liked my approach, because he said he enjoyed geometric proofs. :) I didn't pass the entrance exam so I ended up at Southampton... but I often remember this. Another interview I sat was for Nottingham, oddly enough, where many of Brady's videos are made. In THAT interview, I was asked to integrate e^x.sin(x).cos(x) while they watched, which was WAY harder and made me sweat a bit!
My off-the-cuff conclusion is that only the cube numbers are possible. Proof (?): The volume of a cube with all integer-component edge vector is V = (a^2 + b^2 + c^2)^(3/2). Since a^2 + b^2 + c^2 and V are both integers, a^2 + b^2 + c^2 must be a square number and V a cube number (no other kind of integer can be raised to the 1.5th power and get another integer). EDIT: I'm assuming you want V to be an integer. Interestingly, this ambiguity wasn't present in the 2D case since restricting the edge vector components to be integers there automatically forced the area to be an integer as well.
I think it's possible, and in fact, a volume of 3 is peanuts (a = b = c = 1). The trick is figuring out whether there's any discernable pattern. I suspect 4 dimensions and quaternions would be easier to work with.
@@timh.6872 Can you elaborate? If all sides have a length of 1, the volume is 1. If one corner is at (0,0,0) and an adjacent one at (1,1,1), the volume is 3^1.5, which isn't an integer.
For the past two years, I have been studying an area of math known as googology. Googology is basically the study of very large numbers and the notations that is used to express them. When you study googology in depth, you can see that the so-called scientific notation which we usually use to express large numbers is actually incredibly weak in comparison to many of the commonly used notations in googology such as Knuth's up-arrow notation, fast-growing hierarchy, Bird's Array Notation and Bashicu Matrix System, although it may not seems weak at all to an average person. This is mainly because we don't need numbers much larger than those that can be made using exponents in real life. For example, the mass of Sun is approximately 2*10^30 kg and the number of subatomic particles in the universe is approimately 10^80. Below I will show you the formal definition and some examples of expression in Knuth's up-arrow notation: a^^^^...^^^b with n uparrows = a^^^...^a^^^...^^a^^^...^^a... ...a^^^..^^a with (n-1) uparrows between each successive a's Where a^b is the same as a raised to the power tower of b First, we will take a review of addition, multiplication and exponentiation. We had all studied in school that addition is repeated counting, multiplication is repeated addition and exponentiation is repeated multiplication, mathematically: a+b = a+1+1+1...+1 (repeated b times) a*b = a+a+a...+a (repeated b times), and a^b = a*a*a*a...*a (repeated b times) Now, we will start with the double up-arrow operator, which is better known as tetration. a^^b (read this as "a tetrated to b") = a^a^a^a^...^a (b times) (a power tower of a's b terms high) Keep in mind that exponents are always right-associative, so a^b^c^d is the same as a^(b^(c^d)) For example, 2^^3 = 2^2^2 = 2^4 = 16 2^^4 = 2^2^2^2 = 2^2^4 = 2^16 = 65536 2^^5 = 2^2^2^2^2 = 2^2^2^4 = 2^2^16 = 2^65536 = 10^(log10(2)*65536) using rules of logarithm = approx. 2*10^19728 (a number WITH 19729 DIGITS!!!!!!) 3^^3 = 3^3^3 = 3^27 = 7,625,597,484,987 (approximately 7.6 trillion for short) 10^^^3 = 10^10^10 = 10^(10 billion) = 1 followed by ten billion zeroes Now do you see how powerful tetration is in comparison to scientific notation? But that's not the end of the story. Just like how tetration is repeated exponentiation, pentation is repeated tetration, which is normally denoted as triple up arrows (^^^) In summary, the n arrow operator is repeated (n-1) arrow operator After that, I suggest you to learn the definition of fast-growing hierarchy, which is basically like this: f_n(a) = (f_(n-1))^a(a), when n is a successor ordinal, or in other words, f_(n-1)(f_(n-1)(...(f_(n-1)(a))...)) (nested n times) When n is a limit ordinal, f_n(a) is defined as f_(n[a])(a), where n[a] is the n-th element of the fundamental sequence of the ordinal n For the definition of successor and limit ordinals, you can search it yourself in Googology Wiki Now, here's an equation for you. Given that 1/f_x(100) is the amount of DNA I inherit from my mom, try to find the ordinal x. The ordinal x here is known as my DNA ordinal Here's the approximate value of x in Bashicu Matrix System: (0,0,0)(1,1,1)(2,2,2)(3,3,3)(3,3,0)(4,4,1)(5,5,2)(6,6,2)(7,7,0)(8,8,1)(9,9,2)(10,9,2)(11,9,0)(12,10,1)(13,11,2)(13,11,2)(13,11,1)(14,12,2)(14,11,1)(15,12,2)(15,11,1)(16,12,0)(17,13,1)(18,14,2)(18,14,2)(18,14,1)(19,15,2)(19,14,1)(20,15,2)(20,14,1)(21,15,0)(22,16,1)(23,17,2)(23,17,2)(23,17,1)(24,18,2)(24,17,1)(25,18,2)(25,17,0)(26,18,1)(27,19,2)(27,19,2)(27,19,1)(28,20,2)(28,19,1)(29,20,2)(29,19,0)(30,20,1)(31,21,2)(31,21,2)(31,21,1)(32,22,2)(32,21,1)(33,22,2)(33,21,0)(34,22,1)(35,23,2)(35,23,2)(35,23,1)(36,24,2)(36,23,1)(37,24,2)(37,23,0)(38,24,1)(39,25,2)(40,25,2)(40,25,1)(41,26,2)(41,22,1)(42,23,2)(42,23,2)(42,23,1)(43,24,2)(43,23,1)(44,24,2)(44,23,0)(45,24,1)(46,25,2)(47,25,2)(47,25,1)(48,26,1)(49,27,0)(50,28,1)(51,29,2)(52,29,2)(52,29,1)(53,30,0)(54,31,1)(55,32,2)(56,32,2)(56,32,0)(57,33,1)(58,34,2)(59,34,2)(59,34,0)(60,35,1)(61,36,2)(62,36,2)(62,36,0)(63,37,1)(64,38,2)(65,38,2)(65,38,0)(66,39,1)(67,40,2)(68,40,2)(68,40,0)(69,41,1)(70,42,2)(71,42,2)(71,42,0)(72,43,1)(73,44,0)(74,45,1)(75,44,0)... ... For the definition of Bashicu Matrix System, you can search it up yourself in google So can you please help me to analyze my DNA ordinal?
Looking at the animation at 11:54 I think the answer to Brady's question would be more sparse, because as you go on the angles available becomes more and therefore the numbers.
What an incredible way to show the proof of the Pythagorus theorem. I found a very non rigorous proof of it using similar triangles and an inscribed rectangle.
As for sparsity of numbers that is a sum of two squares, we can just look at the proportion of numbers which satisfy this criterion. Let p be any prime, and let n be a positive integer. Then, as a first step, we want to see what proportion of numbers from 1 to n satisfy this criterion, at least according to p. That is, how many numbers between 1 and n have an odd power of p in its prime factorization. To calculate this, you can ask how many numbers are divisible by p^0 but not p^1, then p^2 but not p^3 and so on. You can show that it is precisely n-floor(n/p)+floor(n/p^2)-floor(n/p^3)-... using inclusion exclusion. This is just n(1-1/(p(1+p)))+O(log_p(n)). Now you want to know the number of numbers satisfying the criterion for all p. This is just 1 - the proportion of numbers not saying the criterion for some p. Here you have to use inclusion exclusion again, except on infinitely many prime numbers.
I stumbled into that Pythagorean proof on my own back when I was just starting calculus and, for all the math I did after, nothing will ever top that moment for me. I peaked early.
Does this have something to do with 3blue1brown's video on pi hiding it prime regularities? His video talks about how many grid points show up on circles of square roots of numbers and the same pattern showed up and he goes into some detail about why certain numbers hit a certain amount of grid points.
Pausing at the 4 minute mark... it seems immediately obvious to me that the easier way of calculating the size of the possible squares is with the Pythagorean Theorem rather than subtracting triangles. a^2+b^2 = c^2, and c^2 is the area of the square. So the squares you can make have sizes of a^2+b^2. We can include perfect squares in this simple equation by setting the following limits for a and b: a and b are integers. a>0. b>=0.
All numbers that can be done, except 0, when written in binary, end in 01 followed by some number of zeros. The first number of that form that cannot be done is 21 (10101).
Removing a trailing zero from a binary number is dividing by two so these numbers are of the form (4k+1)*2^x where k is the number encoded by bits to the left of the 01 and x is the number of trailing zeros. As an example consider 1010001000 this splits to 10100 01 000 which means it is (4*20+1)*2^3 = 81*8 = 648. As such, numbers like this which cannot be done are those for which the 4k+1 part cannot be done. Taking 1010001000 again 81 can be done, so 648 can. So the most interesting ones are those that end 01 (i.e. numbers of the form 4k+1 which are not expressible as the sum of two squares).