Hacker News new | ask | show | jobs
by sahmeepee 548 days ago
A similar method is handy for some mental arithmetic involving squares, e.g. it's easy to calculate 1005² because it's 1000² plus two added blocks of 5 x 1000, plus a small 5² block, so 1,010,025. Going the other way, 995² is 1000² minus those same two 5 x 1000 blocks, plus 5², so 990,025.

(Edited due to formatting fail!)

1 comments

There are other fun tricks for squares like this: https://blog.jgc.org/2010/03/squaring-two-digit-numbers-in-y...
Thanks - the comments are worth reading too