flexagon: (Default)
flexagon ([personal profile] flexagon) wrote2011-04-23 10:51 pm

I wrote this on the plane: number theory

Dumb little explorations in number theory. As I've mentioned, I sometimes fall asleep by calculating squares in my head. I go quickly through the ones I have memorized, and hit the higher numbers where the long multiplication starts to put me to sleep. At times I've done variants, like calculating each one twice: first by multiplication, then by taking the last square and adding 2n+1, double checking myself. It's just a way to fill up all my short-term memory registers with numbers so I can't worry about work or delve into the many repulsive attributes of myself.

A couple of nights ago I was extra stressed, and decided to convert each square to base 7. That added enough novelty that I started really low: with 3, whose square is 9, which in base 7 is "12".

And higher and higher. As my extremities started to go numb with falling asleep, I converted 64 into base 7 to get "121" and smiled… sleepily… because that's a square number in base ten, too, of course, and isn't that pretty. I made some kind of math mistake as I converted 81, and then flickered out like a light.

The next night I told [livejournal.com profile] heisenbug my discovery, and then I did the whole thing again, except I thought: hey, maybe I should convert the number to base 7 first and then square it, doing the math in base 7. well, that was pretty damn straightforward. 7 in base seven is "10", which squares to "100" which means 49.

8 in base 7 is "11", which squares to 121:

 11
x11
---
 11
11
---
121


And of course, of course, 11 will always do that, and so "121" is a square of (base + 1) in pretty much any base. Except base 2 where there is no 2 digit and the addition part of the long multiplication will cause a carry-over.

Likewise, the square of "12" is always going to be "144" as long as there's a 4 digit (base five and up). The square of "13" requires base ten or higher, and the square of 14, well, it already involves a carry-over in base ten. In hex it would, too, so geez… you need base 17.

It would be fun to generalize: if you're squaring a two-digit number, in what base b do you need to be doing the math such that the answer will be the same in all bases b or higher?

[identity profile] nevers.livejournal.com 2011-04-24 03:19 am (UTC)(link)
i used to square numbers in my head to fall asleep! going through the ones i'd memorized and then calculating the rest (not long multiplication though!). how high up have you memorized?
unfortunately, after that bit of recognition, this post lost me. i mean, i get converting numbers nto other bases, but that's about it. BUT i'm glad you've shared this on lj anyway and also that you have a partner who you can be math geeky with :)

[identity profile] crs.livejournal.com 2011-04-24 04:46 am (UTC)(link)
(x+y)^2 = x^2+2xy+y^2.

for x = 10 and y = 1, well, you get 100 + 20 + 1. Always.

Is that what you had in mind?

[identity profile] soong.livejournal.com 2011-04-24 04:36 pm (UTC)(link)
Looks like to represent "xy"^2 without symmetry-breaking-carrying you need base of ((y^2) + 1).