[HN Gopher] Memorizing the first 100 perfect squares (2022)
___________________________________________________________________
Memorizing the first 100 perfect squares (2022)
Author : aragonite
Score : 84 points
Date : 2024-09-06 23:27 UTC (3 days ago)
(HTM) web link (dzhu.page)
(TXT) w3m dump (dzhu.page)
| thechao wrote:
| (10a + b)^2 = 100a^2 + b^2 + 2ab
|
| So... 73^2 is 4900 + 9 + 420 = 5329. The really nice part is
| getting estimates for square roots of numbers.
|
| So, sqrt(3895)? 60^2 + 120n = 3600 + 120n => n=2; that's 3844
| (from above); the difference is 51; the residual estimate is
| then: 62 51/(62*2).
| metacritic12 wrote:
| 20ab?
| thechao wrote:
| Yes
| quantum_state wrote:
| 73-50=23 => 23x200=4600, 50-23=27, 27^2=729 =>
| 73^2=4600+729=5329, all can be done in one's head.
|
| For 27^2, one can just memorize, or: 27-25=2 => 2x100=200,
| 25-2=23, 23^2=529. 27^2=200+529=729.
|
| As long as one knows square of numbers up to 25, it is done for
| all up to 100 and more ... :-).
| rustybolt wrote:
| One nice thing from knowing squares is that you can calculate for
| example 23 * 47 as (35 - 12) * (35 + 12) = 35^2 - 12^2.
|
| But this doesn't always work and you still need to be good at
| adding/subtracting.
| JadeNB wrote:
| > But this doesn't always work and you still need to be good at
| adding/subtracting.
|
| It _does_ always work. If you mean that not every integer
| product can be written this way, you 're right; 23 x 46 can't,
| unless you're willing to memorise squares of half-integers.
| But, if avoiding non-squaring multiplication is really key,
| then you can still just write 23 x 46 = 23 x 47 - 23, and then
| compute 23 x 47 = 35^2 - 15^2 as you suggest.
| shiandow wrote:
| Or you could do ((46+23)^2 -(46-23)^2) / 4
|
| Or one of several similar formulae, but each has its own pros
| and cons.
| JadeNB wrote:
| > Or you could do ((46+23)^2 -(46-23)^2) / 4
|
| Sure, of course that works algebraically, though this
| method will always involve at least one bigger square, and
| division by 4, which, if working in base 10, can be
| implemented with exactly the computational complexity of
| multiplying by 25--so perhaps is also meant to be avoided,
| if we're trying to avoid multiplication! As you say, there
| are pros and cons of all approaches, including just doing
| the multiplication.
| amelius wrote:
| What is wrong with computing it just as 7*23 + 40*23 ?
| bibanez wrote:
| Nothing, but if you know perfect squares you will do 3
| additions/subtractions instead of 2 products and 1 addition
| kstrauser wrote:
| I'm good at arithmetic, to the point that my buddy called from
| across the country a few days ago to have me perform "hard"
| math questions for his kids. It's always a relief when they
| pick random numbers like "what's 83 times 97?" Whew. Well,
| 90**2 - 7**2 = 8051. As a bonus, when you explain that method,
| it sounds even more impressive to them: "you mean, you just
| know what 63 squared is?" Sure, but it didn't happen overnight.
| bee_rider wrote:
| I think your star star just rendered as a star.
| kstrauser wrote:
| Oops, good catch.
| teachrdan wrote:
| That close to 100, I'll just do 83*100 - 83*3
| kstrauser wrote:
| That takes me longer for whatever reason. It would also
| require me to identify that as a special "close to 100"
| case I'd have already calculated it the other way by the
| time decided to swap in that algorithm. Basically,
| branching takes me too many cycles.
| nine_k wrote:
| Hmm, this looks like a neat trick to make hardware
| multiplication faster. Say, for 8-bit numbers it would require
| 3 8-bit additions/subtractions and one 16-bit addition, one
| 9-bit shift, and two lookups in a 512-byte table of squares,
| and zero conditional processing, as opposed to 8 16-bit
| additione, 8 16-bit shifts, and 8 LSB tests that a naive
| iterative algorithm would do.
|
| I wonder what real integer multiplication hardware uses.
| amelius wrote:
| It all depends on how you can parallellize it.
| ysofunny wrote:
| I memorized all primes up to 127. and with a bit of effort I may
| come up with all the primes up to 307 (then 311,313, iirc) but I
| need pen and paper to double check.
|
| the problem is that I don't know why do this.
|
| nonetheless I can report that I've memorized 3 instances of two
| consecutive twin primes
|
| 11,13,17,19, then 101,103,107,109 (which just raises questions
| that I can only aspire to ask, nevermined answering, about the
| what, why, and how of decimal system),
|
| and then 191,193,197,199. the next prime is 211. but the cool
| thing is how 210 = 2*3*5*7, which are all primes before the first
| double twin prime
| your_friend wrote:
| reading this just reminded me how i miss talking to my friends
| with scientific background
| kstrauser wrote:
| I know exactly why I do this. I use to deliver pizza. My store
| was on the edge of a medium-sized city, and a lot of our
| customers were quite the drive away. I'd get incredibly bored
| on these long drives. Somewhere along the way, I'd start
| calculating what percent of my shift I'd worked that minute,
| and I'd try to get it to 3 decimal places before the next
| minute came. Again, no reason whatsoever, just bored. And then
| at some point I thought it'd be more interesting to calculate
| (number of minutes worked) / (number of minutes remaining),
| which is fun because the ratio grows really slowly at first and
| then very quickly. I realized the first step in that was
| dividing out the common factors, so 248 minutes / 232 minutes
| was 31 / 29. (Yes, I'd been taught that in class, but it's one
| thing to have a teacher make you do something and another to
| realize why you'd ever want to do it voluntarily.)
|
| Do that long enough and you find patterns, like 7 * 11 * 13 =
| 1001. If you ever end up calculating n / 11, it's approximately
| the same as n * 7 * 13 / 1000. E.g., 3 / 11 ~= .273. Or take 27
| * 37 = 999. Now n / 37 ~= n * 27 and shuffle the decimals. 7 /
| 37 ~= 7 * 27 / 1000.
|
| And that's how I ended up reasonably good at mental arithmetic,
| and memorizing a frankly unnecessary number of squares, and
| being able to factor lots of numbers at a glance (or recognize
| that they're prime). I was awfully bored for an awfully long
| time.
| FredPret wrote:
| Boredom can be great.
|
| Imagine being an ancient Babylonian or Greek with nothing to
| do but wait for your grapes to grow. No wonder they came up
| with lots of great stuff.
| quesera wrote:
| > _Boredom can be great._
|
| I agree, and I worry that the absence of boredom-time,
| especially for kids and adolescents, will turn out to be a
| bad thing.
|
| I've never met a kid or adolescent who shares this concern.
| :)
| lupire wrote:
| 191, 193, 197, 199 are also twin twin prime pairs
|
| These primes have to be 11,13,17,19 + 30k, due to division by
| 3.
|
| 5 is half of 10, so we easily rule out exactly the number
| 10x+5.
|
| 49 = 72,
|
| 77 is a multiple of 7, of course.
|
| 98 = 2 * 72
|
| In order to avoid a multiple of 11 interfering, we need the gap
| preceding 11*10
|
| 99 is (10+1)(10-1) = 102-1 and 100 is 102
|
| , so that clears out space for primes after 100.
|
| Also, You might enjoy "Paterson Primes"
| https://m.youtube.com/watch?v=jhObLT1Lrfo
| ysofunny wrote:
| I'm intersted in why (and how) you reason that thing about
| "multiple 11s interferring"
|
| so I'll tell you how I memorized the primes between 2 and
| 127.
|
| to begin: all primes less than ten: 2,3,5,7. I seem to have
| learned these by rote memorization. but then, the 'fun
| coincidences' begin.
|
| because 5 is a multiple of "ten", all primes after 10 can
| only end in 1,3,7,9. this is a key somehow.
|
| this gives the first fun coincidence: that 11 and 101 are
| both prime.
|
| after 19 comes 23. similarly (and this is the part where
| every self-respecting numberphiliac waves their hands a
| little, in excitement I hope), 113 ("one one three") is the
| next prime after "one oh nine".
|
| notice that 23,29,31,37 are as much prime as 30+{23,29,31,37}
| = 53,59,61,67
|
| this covers almost all of them. but we're missing primes in
| the 40s, and the 70s. as well as primes in the 80s and 90s
| (only 3 primes: 83, 89, and 97. I have no tricks to remember
| these 3. only rote repetition)
|
| the forties and seventies, are a very compact: both 1,3. but
| only 47, and only 79; because, well, what fun! seven squared
| and seven eleven are just so simple, like low-hanging fruit
| in the garden of prime-number coincidences
| kstrauser wrote:
| I confess that none of those patterns resonate with me at
| all. I'm not sure if I can even see that patterns in them
| that you see.
|
| Conversely, to me, 9733 "looks prime". I couldn't explain
| that if I had to. It just does.
|
| I like that there's enough prime real estate for us all to
| see it differently.
| ysofunny wrote:
| I've realized that the way I explained the "patterns" is
| very different from what I was doing when I noticed them.
| which makes sense as I was not trying to explain that
| little "game". it's not a game it's just counting and
| writing primes in some base, and a dash instead for every
| composite. as the gaps get bigger I draw a triangle
| instead of 3 dashes; and then any glyph with as many
| strokes as dashes.
|
| doing it in different bases helps to think about the
| numbers without their decimal representation. which I
| guess is the point, and might be helping me imagine
| patterns that may or may not be there. if I learned
| anything from doing this is that there is no pattern, it
| just seems as if there is one but it's never really
| there.
|
| I like to think that the "patterns" expire, they have
| only so many uses in them. often just one use which
| breaks the point of being a 'pattern', but that's primes;
| is all am saying.
| absolute7 wrote:
| This is cool
| freedomben wrote:
| Why is it cool? What is it about TFA that interests you? What
| does it do that other resources have not done? Does it help you
| think about the problem in a different way?
|
| I've always been fascinated with the perfect squares, and
| various patterns that arise from observing them. I love how the
| article examines the patterns and then extrapolates the study
| of the patterns to a tool for memorization.
| vinay_ys wrote:
| This is beautiful. Maybe useless, but still a lot of fun to
| learn.
| jurassicfoxy wrote:
| I previously memorized pi to 100 decimals. Was fun, and now I'll
| never forget 3.1415926535897932384626433 ... how many is that?
| 25?
|
| There are a several little triplet "patterns" in this first batch
| that make it easy to this point:
|
| 3.1415 926 535 8 979 323 84 626 433.
| FredPret wrote:
| I'm guessing the answer to this question is no, but... for an
| irrational number like pi, can we guarantee that a certain
| digit sequence will occur somewhere in its infinite reaches?
|
| That would be a wildly impractical but very fun way to encode
| information - if everybody had a couple of petabytes of pi on
| their harddrive one day, you could just send the starting and
| ending digit to communicate an arbitrary amount of information
| this way.
|
| Of course you'd first have to search through the whole universe
| of digits to find a sequence that's just right.
| Arnavion wrote:
| Such numbers are called "normal numbers". Pi likely is one
| based on all the digits we've computed for it, but we don't
| have any way to prove a given number like pi is normal or
| not.
|
| Relevant Numberphile video:
| https://www.youtube.com/watch?v=5TkIe60y2GI
| FredPret wrote:
| Very interesting, thank you. He starts talking about this
| at 8:20
| thfuran wrote:
| 1.01001000100001... is infinite and non-repeating, but
| doesn't contain all substrings. A number that does is called
| a "normal" number, and it's not known whether pi is. It seems
| to be pretty normal though.
| kurisufag wrote:
| this in practice: https://github.com/ajeetdsouza/pifs
| bitwize wrote:
| That reminds me of how on The IT Crowd, the new -- exceedingly
| long -- Emergency Services number replacing 999 was fairly easy
| for Moss to remember. Being divided into groups of at most 5
| digits probably helped.
| frankus wrote:
| Our math prof (who moonlighted as a "mathemagician") taught us a
| trick for two-digit squares:
|
| For e.g. 23 x 23, subtract three from the first number, add three
| to the second, and then add 32 to the product. So 20 x 26 + 9,
| the idea being that multiplying by a multiple of 10 is easier to
| do mentally.
| JohnMakin wrote:
| This would have made my college career significantly easier. We
| were limited on scratch paper (dumb policy) on many tests, and
| I have to write out arithmetic like this long-hand style, which
| took up a ton of space.
| bee_rider wrote:
| I think these sort of mental math tricks are _mostly_ useful
| when you have a case where you've got a formula that you
| often have to run, and it is similar enough every time that
| you can pre-do the algebra.
|
| The one everyone knows is calculating a tip (bump the decimal
| place left once and double the result, round depending on how
| nice you feel). Might be applied multiple times per day,
| depending on your dining habits.
|
| I bet the formulae you had to use on your tests were worth
| doing by hand.
| JohnMakin wrote:
| They weren't formulae - it was literal arithmetic. Complete
| waste of time and space.
| laurentlb wrote:
| My formula for calculating a tip is `return 0`, but it's
| very country-dependant.
|
| (US-defaultism?)
| spookie wrote:
| You may tip anywhere you find the service pleasant.
|
| (EU guy who has worked as a waiter)
| akovaski wrote:
| I recently leafed through "Mathematics for Engineers"[0],
| originally from 1926, which begins with many such methods for
| making arithmetic easier. Though maybe not always more space
| efficient.
|
| Luckily I got to use a calculator for school.
|
| [0]https://archive.org/details/dli.ernet.11725/page/n9/mode/1
| up
| hinkley wrote:
| If you look at the way they teach kids math on paper today,
| they are just teaching them how to do math in your head. The
| idea being that if your hands were free you'd use the
| calculator on your phone.
|
| When I first encountered the outrage over New Math my first
| thought was that this is how I avoid embarrassing myself in
| checkout lines. Do I have enough cash to pay for this stuff
| in my hands?
| hinkley wrote:
| I do the less efficient quadratic form. It works but is slower.
|
| 202 + 20 x 3 x 2 + 32
| pranaysy wrote:
| Neat! This is (a+b)(a-b) + b2 = a2-b2 + b2 = a2 and in your eg,
| a=23 and b=3
|
| In addition to using this trick for getting to multiples of 10,
| I used it to compute the product of two numbers by leveraging
| their proximity to a number in between whose square I knew. For
| eg if I need to multiply 23 by 27, I instead see it as
| (25-2)(25+2), which is 252-22 = 621.
|
| (using that same trick from the article to calculate squares of
| numbers that end in 5)
| pranaysy wrote:
| For ref: https://en.m.wikipedia.org/wiki/Difference_of_two_sq
| uares#Me...
| koolba wrote:
| That's a neat one!
|
| _(a + b)(a - b) = a^2 - b^2_
|
| _a^2 = (a + b)(a - b) + b^2_
|
| So pick a value of _b_ that makes _a - b_ end in a zero.
| lupire wrote:
| No need to memorize
|
| (10a+5)2 = [a * (a+1)][25]
|
| (a+1)2 = a2 + a + (a+1)
|
| (a-1)2 = a2 - a - (a-1)
|
| (a+2)2 = a2 + 4(a+1)
|
| (a-2)2 = a2 - 4(a-1)
| apalmer wrote:
| I am not knocking the article but seems like if you are going to
| dedicate the effort of learning quick mental math it's probably
| more efficient to 'just' know how to multiple 2 digits quickly
| than specifically focusing on 2 digit squares...
| dxbydt wrote:
| I give amc & mathcount mocks to kids every weekend & time them.
| There was one question everyone got under 5 seconds. I was like
| how did you guys do it so fast. Apparently aops had told them
| every year will have a special property that'll forsure be on the
| test. So that's why they all knew 45^2 was 2025.
| madcaptenor wrote:
| When I did math competitions I remember getting the advice to
| know the prime factorization of the current year.
| dxbydt wrote:
| 45^2 = 2025 => must be the sum of first 45 odds => 1 + 3 +
| ... + 87+ 89 = 2025
|
| while its not pythagorean, 40^2 + 20^2 + 5^2 = 2025.
|
| 877 is another bullcrap that has shown up on a bunch of these
| tests. 877 is a prime, and four times 877 is 3508 = sum of
| all the divisors of 2025.
|
| there's a bunch more i shared with them.
___________________________________________________________________
(page generated 2024-09-10 23:01 UTC)