Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I had the exact same route to 3 guesses on today's puzzle.  Very nice.

Square Numbers

Okay, strap in.  I don't know the exact number I have memorized at this point, but it'd be probably in somewhere in the 80s before I'd have a do a quick sanity check to make sure.  However, I can square rather large numbers in my head, though 5- and 6-digit ones are usually slow.  3-digit squares shouldn't take more than a few seconds.

I'll cut-and-paste and adapt stuff I've written elsewhere on how to do it.  I'm confident that you could at least mentally calculate at least three-digit squares fairly quickly without too much practice.  My method is one I developed while bored in high school English class years ago.  Others have certainly independently come up with it.

First, you need to memorize squares up to 25, but that's it.

For squares larger than 25, I rewrite them in the format:

(50n ± y)², where y is between 0 and 25.

(50n ± y)² =
2500n² ± 2 * 50 * y + y² =
2500n² ± 100y + y²

This means the last two-digits are only affected by the y² term.  The other two terms are hundreds and above.  Moreover, the y² term only contributes a number between 0 & 6 to the hundreds digit, which is easy to handle.

For example,

64² =
(50 + 14)² =
50² + 2 * 50 * 14 + 14² =
2500 + 14 * 100 + 14² =
3900 + 14² =
3900 + 196 =
4096

283² =
(300 - 17)² =
300² - 2 * 300 * 17 + 17² =
90,000 - (6 * 17) * 100 + 17² =
100 * (900 - 102) + 17² =
100 * (798) + 17² =
79,800 + 289 =
80,089

Now, this does involve knowing what all the squares ending in -50 (i.e., 100n + 50)...350, 450 , 550, etc.

I've got a trick for that, too.  To square a number ending in 5 (10n + 5), all you need to do is:

1) Remove the ending 5.
2) Take the remaining number and multiply it by one plus that number (n(n+1)).
3) Take that result and postpend 25 on the end.  That's the solution.

So;

35² = 1225
45² = 2025
55² = 3025
65² = 4225
95² = 9025
2835² = 8,037,225

For that last one, I used the result above for 283² (80,089), added 283 (80,372), and then put a 25 on the end.

Now, if you want to calculate 763²:

(750 + 13)² =
(75²)(10²) + 2 * 750 * 13 + 13² =
5625 * 100 + 15 * 13 * 100 + 13² =
(5625 + 195) * 100 + 13² =
582,000 + 169 =
582,169

For 4-, 5-, and 6-digit numbers, instead of 50n, I'd use 500n, 5000n, 50000n, respectively.  That means the range of y goes up by a factor of 10 each time, between 0 & 250, 0 & 2500, etc.  .However, that means I have to repeat the process multiple times:

Leveraging the answer for 283² = 80,089, let's calculate 4283²:

(4000 + 283)² =
4000² + 2 * 4000 * 283 + 283² = 
16,000 * 1000 + 8 * 283 1000 * + 283² =
(16,000 + 2264) * 1000 + 283² =
18,264 * 1000 + 283² =
18,264,000 + 80,089 =
18,344,089

Please note in all these calculations how easy all the addition steps are.  There is usually only one or two non-zero digits that overlap.  The 769² one was the hardest because I had 5625 + 195, which still isn't that bad.

I wouldn't worry about doing 4-digit numbers, anyway.  I'd first start learning up to about 125², which isn't hard and is impressive and useful enough.  Your next goal might be up to around 625².  That way, the middle term in the expansion only involves multiplying a number from 1 thru 25 by a number 1 thru 12:

(550 + 3 )² =
302,500 + 2 * 550 * 3 + 3² =
3025 * 100 + (11 * 3) * 100 + 3² =
(3025 + 33) * 100 + 3² =
305,800 + 9 =
305,809

This can expand as far as you need.  The problem is that once you get to 5- and 6-digits, you need to repeat the process multiple times and memory becomes a problem:

123,456² =
(100,000 + 23,456)²
10 billion + 2 * 100,000 * 23,456 + 23,456²

Which means I now have to do (20,000 + 3456)², which involves 456², which is (500 - 44)².  There's no reason to need to do that for numbers that large unless you get bored easily.  Calculating it in this iterative manner, starting with 456², minimizes how much short-term memory I need.

Finally, being able to square numbers quickly is useful because then you can often use the difference of two squares to multiply two different numbers very fast. 

24 * 36 =
(30 - 6)(30 + 6) =
30² - 6² =
900 - 36 =
864

Leveraging the calculation of 283² from above:

274 * 292 =
(283 - 9)(283 + 9) =
283² - 9² =
80,089 - 81 =
80,008

Because I'm so adept with calculating square numbers, I use difference of two squares a lot.  This quite a bit to digest.  I'm obviously open to clarify any of that.

xdle BONUS:  As part of that y² term being the only part that affects the last two digits, that means all 22 possible two-digit endings are found in 1² through 24².  24² and 26² share the same two-digit ending (576 & 676).  Same with 23² and 27² (529 & 729).  Same with 1², 49², 51², 99², 101², etc.   

Moreover, the numbers 2, 3, 7, and 8 will never be in the units digit.  That can help you quickly judge some of those "(x + 792) is a perfect square" type clues.

Feels like something I could do in my spare time, thanks for the strat :)

2500n² ± 100y + y²

The rest of the comment is correct, but you've forgotten the n for the center term (insert FOIL joke here).

3-digit squares shouldn't take more than a few seconds

That's really impressive!

Do you prefer squaring n then multiplying by 25, or is it better to do the squares that end in 5 (so, for 407, do you prefer 400*400 + 100*7*8 + 49 or 2500 * 64 + 100*7*8 + 49)?

 I'd first start learning up to about 125², which isn't hard and is impressive and useful enough.

As a newbie to squaring numbers, just memorizing the first 25 will be my first task lol

I wouldn't worry about doing 4-digit numbers, anyway.

I mean we have phones/calculators that can calculate squares for us. To me, memorizing squares/doing mental math is just a fun way to pass the time + a neat trick to be able to do.

On a somewhat related note, today's (10/17) xdle has "x+499 is square", which I would swear is not a coincidence. After a run of bad luck starting with 499, I finally understand how effective 499 is. Even luckier, we once again have a candidate (230) which is in the center of the list and divisible by 10, which I find aesthetically pleasing and gets me a three-guess win. Although I will (humorously) note that (512,243) is also an easy 3, but only because 512 gives a prime hint.

Do you prefer squaring n then multiplying by 25, or is it better to do the squares that end in 5 (so, for 407, do you prefer 400*400 + 100*7*8 + 49 or 2500 * 64 + 100*7*8 + 49)?

That's an excellent question.  That formula was more for proof concept (i.e., eliminating carries and making the units and tens digit controlled only by the y² term).  In practice, I don't pay attention to what the n is nor think of the formula.

Mentally, what I'd do for 407²:

  1. Double the 4 is 8
  2. Multiply that by 7.  That's 56.
  3. 40² is 1600
  4. Add them: 1656
  5. Multiply by 100: 165,600
  6. Put the 7² on the end.
  7. 165,649

I do the second term first, because that's the variable and most complicated term...and by complicated, I mean 2 * 4 * 7.

Ones where the first term ends in 50 are more tricky, because the 350² has four-digits instead of just two.  That means I'm going to have to do real addition or subtraction.  For 333²:

  1. (350 - 17)²
  2. Double the 3.5 is 7
  3. Multiply 7 by 17 = 119
  4. 35² is 1225
  5. 1225 - 119 = 1106
  6. Multiply by 100 = 110,600
  7. Add 17² (289).
  8. 110,889

Step 5 annoys me,  So, taking advantage of the fact that, for practical purposes, I have all two-digit squares memorized, I would do calculate this as (300 + 33)².  Rounding to the nearest 100 usually causes the middle term have more digits  However, the first term now only affects the ten-thousands and hundred-thousands digit, making the adding or subtracting even easier:

  1. (300 + 33)²
  2. Double the 3 is 6
  3. Multiply 6 by 33 = 198
  4. 30² is 900
  5. 900 + 198 = 1098
  6. Multiply by 100 = 109,800
  7. Add 33² (1089).
  8. 110,889

Step 5 is now trivial, though the addition in step 7 is likely to be more complicated.  It will be an addition and an addition of at most two digits...in this case, ignoring the tens and units digits, the addition is just 1098 + 10.  Using 350², I had to subtract a 3-digit number from a 4-digit number.  The good thing there is that I'm extremely familiar with the 4-digit number and that number will always end in 25.

I am a bit inconsistent when squaring numbers that end in 26 through 74 on whether I round to the nearest 50 vs. the nearest 100.  However, I never use the first term as 450, 550, 950, or 1050.  That's because using 500 and 1000 are even easier, because the middle term will have a 0 as its hundreds digit:

(500 ± y)² = 
250,000 ± 2 * 500 * y + y² =
250 * 1000 ± y * 1000 + y² =
(250 ± y) * 1000 + y² =

That is super easy.  I just add or subtract y from 250.  That's the thousands.  Then add y².  

For 576² -> 250 + 76 = 326 -> 326,000 + 76².

76² = 5776 -> 576² = 331,776

And, in practice, rather than add or subtract y from 250, I take the original 576 and subtract 250 from it.  It equals, 326 either way.

There are several other optimizations from having done this multiple times, but I've already complicated it more than is ideal.  This may be something to bookmark or save somewhere and revisit to incrementally develop your ability, if you want to do it at all.

Even if you don't have squares up to 25² memorized, you could use this for calculating squares between 40² and 60² or 90² and 110² at first and build from there.

I mean we have phones/calculators that can calculate squares for us. To me, memorizing squares/doing mental math is just a fun way to pass the time + a neat trick to be able to do.

It is a stupid human trick and, yes, it would be more useful in the years before people carried computers in their pockets everywhere.  However, being able to quickly do mental arithmetic is still helpful.  It gives you more information than you'd have otherwise.  In an extremely dorky hypothetical, it can allow you to quickly spot when your local Which Wich sub shop is calculating 8.25% incorrectly on your $5.75 sub.  You can then inform them and their district office and they'll give you free subs.  

Hypothetically.

On a somewhat related note, today's (10/17) xdle has "x+499 is square", which I would swear is not a coincidence. After a run of bad luck starting with 499, I finally understand how effective 499 is. Even luckier, we once again have a candidate (230) which is in the center of the list and divisible by 10, which I find aesthetically pleasing and gets me a three-guess win. Although I will (humorously) note that (512,243) is also an easy 3, but only because 512 gives a prime hint.

You did better than I.

Since 25² and 27² are a 4th power and a 6th power, respectively, I eliminated those as candidates.  That left the squares of 23, 24, 26, 28, 29, 30, and 31.  I went with 28², which was the middle.  285 gave me "x < 285; x and 285's largest divisor is 3."  24² would be 077, which isn't divisible by 3.  Both 030 and 177 are.  

Unfortunately, I was careless and failed to recognize that 030 and 285 are both divisible by 5, so its largest divisor would have been 15.

I guessed 030, when it clearly had to be 177.  I didn't even notice I messed that up until right now.  I thought I just lost a coinflip.

It make sense that (100n + y)² is easier to calculate, what with less overlapping additions.

I am a bit inconsistent when squaring numbers that end in 26 through 74 on whether I round to the nearest 50 vs. the nearest 100.

Well, I say that the inconsistency puts the mental in mental math.

Double the 3 is 6
Multiply 6 by 33 = 198

Would it be easier to double 33 and then multiply by 3? Though I dunno if 6*33 is harder than 3*66, and if at this point muscle memory makes you prefer the former.

However, being able to quickly do mental arithmetic is still helpful.  It gives you more information than you'd have otherwise.

Oh absolutely, I don't deny that, mental math generally faster than a phone, especially when you've perfected it to a T. As a tangent, it blows me away how so many people just... don't know their times tables. Like, even something as "simple" as 7*6 is apparently enough to make them reach for their phone calculators.

Unfortunately, I was careless and failed to recognize that 030 and 285 are both divisible by 5, so its largest divisor would have been 15.

It happens. Today (10/18) I had the misfortune of guessing 253 as my 2nd choice, when I should've gone for an even number (because since 253 gives me the same clue again, I can only narrow it down to (171, 120, 89, 48, 7)); guessing 294 gives (171, 89, 7), which is much more likely to guess correctly and get a 3-win (and also with 294 I can eliminate 171 since it and 294 are divisible by 3).

It make sense that (100n + y)² is easier to calculate, what with less overlapping additions.

Right, but that requires memorizing squares up to at least 50, which I think is more unreasonable for most people. That's why I explained it with the 50n.  I strictly used the 50n for quite a while except for numbers near between 410 & 590 or 910 and higher.  From high school until I was almost 30, I only ever tried this up to about 600² and for numbers around 1000²,  except for rare occasions.  It was only then that I realized expanding to 4-digit, 5-digit, and larger numbers was quite feasible.

> Double the 3 is 6 Multiply 6 by 33 = 198. 
Would it be easier to double 33 and then multiply by 3?

You can.  In my case, I automatically double the first term before really thinking about what the y is.  I see that my first term is going to be 300 or 350 and instantly know that means we're going up by 600s or 700s.  There may be exceptions to this if the y-term ends in 5, but normally it's an automatic step that I don't even think about.

It happens. Today (10/18) I had the misfortune of guessing 253 as my 2nd choice, when I should've gone for an even number (because since 253 gives me the same clue again, I can only narrow it down to (171, 120, 89, 48, 7)); guessing 294 gives (171, 89, 7), which is much more likely to guess correctly and get a 3-win (and also with 294 I can eliminate 171 since it and 294 are divisible by 3).

With the largest prime divisor of 41 clue, there are 12 candidates below 499.  I eliminated the 458 because of the likelihood of it giving "(499-x) is a prime number" clue and I chose the median of the remaining 11 candidates, 212, which is divisible by 4.  Like you, I received the same "largest prime factor is 41" clue again.  However, that allowed me to eliminate more candidates because your smallest factor was 11.

212 was 499 - (7 * 41).  Since it didn't give me the "x and 212's largest divisor is 2 or 4" clue, that left 171, 089, and 007.  I would lean against 171 because I didn't have "(212-x) is a prime number" and for lack of anything else, I chose the middle one of the three to guarantee I'd get it in 3 or 4.

As for the guesses that were 41 away, only one gave the prime number clue:

  • x>48; (x-48) is prime
  • x<130; (x+130)'s largest prime divisor is 73

So, yes, you can't rule anything out just because you didn't get "(x - y) is prime" clue.  You can use that to lean toward one number vs. the other like with 212 vs. 253 with today's puzzle.  212 being divisible by 4 while 253 being an unhelpful 11 * 23 is a more important reason to do that, as you explained above.

Right, but that requires memorizing squares up to at least 50, which I think is more unreasonable for most people.

IMO even going up to 25 is a bit much for most people, but yeah, I can see how 50 is really extreme.

From high school until I was almost 30, I only ever tried this up to about 600² and for numbers around 1000²,

Ah so I've got plenty of time to learn and catch up lol

I eliminated the 458 because of the likelihood of it giving "(499-x) is a prime number" clue

I mean I'd wager that there's a hint priority system, and it goes "guess-x or x-guess largest prime", then "guess+x largest prime", then "guess-x or x-guess is prime", so had 458 been the answer, the hint would've been "499+x's largest prime divisor is 29" (because 458 + 499 = 957 = 29 * 33).

Today's xdle is nothing to write home about. 499 gives "largest prime divisor is 101", which means that guessing any of the candidates gets you an easy 2 or 3; you can eliminate 600 based on what I've said above, which leaves only (701, 802, 903). 701 is the answer and is the easy 2. 802 gives x<802 which only leaves 701. 903 gives the same prime divisor hint, which eliminates 802 (and 903 obviously), which again only leaves 701. And even if you completely hypothetically did a dumb and guessed 600, 600 gives "x-600 is prime", which again eliminates the rest.

Today (10/21) is probably my greatest solve for xdle; right, so today with 499 I got "x-499;s largest prime divisor is 7". So, because I can't be bothered to find a suitable mid-point of the remaining candidates, I guess 729. 729 gives me "729 - x is prime", a hint which I've stated my displeasure of. But I'm slowly coming around to like it.

Now, at this point, the sensible thing to do would have been to guess 604 or 639 or something. But I wanted my 3-win dang it, so I didn't want to hazard a guess.

So instead I wrote out all 33 candidates (well, 32, since 506 is out). Here to we can rule out some of them; 729 doesn't give "largest prime divisor is 3", so we can't have anything divisible by 3. That's a third of them out. Also, 729 - x is prime, so any of the odd number candidates are also out. That's roughly half of the remaining candidates gone. That leaves us with 10, of which we can rule out a lot of them:

Candidates499 hint:  7 is x-499's largest prime divisor
729 hint: 729-x is prime
520
729 - 520 = 209 = 11*19. Not prime
548
562
590590 - 499 = 7*13. 7 is not its largest prime divisor.
604729 - 609 = 125 = 5*25. Not prime
632632 - 499 = 7*19. 7 is not its largest prime divisor.
646
674729 - 674 = 55 = 5*11. Not prime
688
716716 - 499 = 7*31. 7 is not its largest prime divisor.

That leaves us with (548, 562, 646, 688). There's no way to find out which is the correct one, right?

Wrong. 729 - x is prime, which means that 729 + x is also prime, per my last comment. And so we've got:

  • 729 + 646 = 1375 = 5*275
  • 729 + 688 = 1417 = 13*109

So it all comes down to a coin toss. 548 or 562. I'll let you guess which one was the right answer (confession: I thought one of them was divisible by 17 because I didn't carry a 1, so I didn't actually realize it was a coin toss until I wrote this).

I thought I had responded to your previous message, but I can't find it anywhere.

Can you explain this "Wrong. 729 - x is prime, which means that 729 + x is also prime, per my last comment"?

I'm not sure that "729 + 646 = 1375" would prompt a "x + 729's largest divisor is 11" clue.  Those clues seem to usually have the divisor be fairly large...though I don't know what the limits are for fairly large.

As for 10/21, I continued my policy of only using possible solutions.  After 499, I tried 499 + 7 * 35 = 744, which is divisible by 24.  My return clue was "x<744; x and 744's largest divisor is 2."  That means my solution isn't divisible by 3 or 4.  Which means it is also 499 +n * 7 where n mod 4 = 1, and n has no prime factors above 7.

So, n is one of: 1, 9, 21, or 25.  n can't be 5, because 534 is divisible by 3.  Meanwhile, n can't be 13, 17, 21, 29, nor 33 because then 7 wouldn't be the largest prime divisor of x - 499.  The candidates are then: 506, 562, 646, 674:

  • 506 is unlikely because it might have generated "x - 499 is prime" as its first clue.
  • 562 + 744 = 1306 = 2 * 653.  That clue seems fine.  653 is probably too big for "fairly large."
  • 646 + 744  = 1390.  Were 646 the answer, I think the second clue would be "x + 744's largest divisor is 139."
  • 674 + 744 = 1418 = 2 * 709.  That clue seems fine.
Because I thought 646 was unlikely, I guessed 562 on the theory that it splits 506 and the other two candidates.  Guessing 674 is less good because it's not one of the middle two.
(1 edit)
Can you explain this "Wrong. 729 - x is prime, which means that 729 + x is also prime, per my last comment"?

Sure. Per my experimentation, xdle prefers giving the "guess - x's largest prime divisor" hint as opposed to "guess + x's largest prime divisor", which it prefers to "guess - x is prime". You can think of it like how xdle prefers "largest divisor" and "is an nth power" hints to "prime divisor" hints. I haven't seen evidence to the contrary, though I haven't exhaustively checked every number.

Furthermore, xdle won't give the "guess - x's largest prime divisor" hint if guess - x (or x - guess) is itself a prime. Instead, it'll give "guess + x". If guess + x it also a prime, it'll instead give you "guess - x is a prime". I can give some examples:

  • 123: 123 + 500 = 629 = 7*89, but because 500 - 123 = 377 = 13*29, you'll get "x - 123's largest divisor is 13".
  • 79: 79 + 500 = 579, which is prime, so instead you'll get "x+579's largest prime divisor is 83".
  • 99: 500 ± 99 is prime, so you get "x - 99 is prime".
I'm not sure that "729 + 646 = 1375" would prompt a "x + 729's largest divisor is 11" clue.  Those clues seem to usually have the divisor be fairly large...though I don't know what the limits are for fairly large.

They're large because due to how the hints are ordered, you're more likely to get "guess-x" and "guess and x's largest divisor" over "guess+x",  but low divisor hints do exist. For example, try 529 or 67 for today (10/23). You'll get "x+guess's largest prime divisor is 7".

Which means it is also 499 +n * 7 where n mod 4 = 1

Could you explain how you came to this conclusion? I understood the rest, just having a hard time figuring out how you used modular arithmetic here.

Today's (10/23) xdle crashes with 499. (fake confusion) Hmm, I wonder what this could mean... (hey, it's my first 1-guess win!)