Monday 3 March 2014

Mirrors, memories and memoirs - nostalgic numbers rack their brains

Last week I introduced nostalgic numbers as two-digit numbers with the property that, when written in a certain base, each one can (loosely speaking!) look at itself in the mirror and see half of its own value reflected back at it: swapping the digits has the same effect as dividing by 2. I gave some expressions for constructing all possible nostalgic pairs, and it turned out that they are fairly prescriptive: although you can choose any number n to be the first digit of the pair's lowest member, it's then determined that the other digit will be 2n+1, the base will be 3n+2 and the value of the resulting number will be (n+1)(3n+1). Towards the end we asked the question: 'what about numbers that are effectively multiplied/divided by some other number besides 2 when you swap their digits?'

I think we're going to need some more terminology here. We already defined a 'nostalgic pair', and if we want to be clear we can say 'of base k' as well. How about saying that if the lower number doubles when you read it backwards, then it's a 'nostalgic pair of memory 2', and similarly if switching the digits causes it to become a times itself, then it has memory a. We've dealt fully with the memory 2 case - now we can start to examine numbers with better memories! What about a = 3? If I hadn't given the game away last week, you might be asking whether memory 3 pairs exist at all, and the quickest way to prove they do is just to find one:

157 = 1*7 + 5 = 1210 and
517 = 5*7 + 1 = 3610.

Done! Expressed in base 10, {12,36} is the lowest nostalgic pair of memory 3. There's nothing special about the way I found any of these initial pairs, memory 2 or 3. For memory 2, I simply took the formula we deduced last week for the digits (x,y),

y = (2k - 1)/(k - 2) x,

and dived in to see what happened. You'll see exactly what I mean if you give it a try - some cases work and others don't. You spot a pattern in the ones that work and do a little more investigating to prove that intuition correct. We can't always be so lucky as to have the pattern roll out like that, but it's great when it does.

If you're not the sort to find yourself scribbling maths on any bit of paper you can grasp, hours after you were supposed to be sleeping, I may not be able to convince you of how much fun this process of exploring and discovering mathematical ideas is to us lost-cause types: the best way to experience it is to have a go yourself. If you're enjoying this story of nostalgic pairs (and I hope you are at least a little!) then I urge you to have a go at playing with these ideas on your own before reading on, since it's that process of 'maybe this will work... well ok, not quite, but what if I... ooh!' that really gives this rec-math stuff its flavour. If you do plan to experiment, avert your eyes now, because here's the corresponding table for pairs of memory 3:

kxyBase 10 representation
71512
112830
1531156
1941490
............
4n+3n3n+2(4n+2)(n+1) [any base]

Great - a whole new list of numbers, and another rule for constructing them. So we have {12,36}, {30,90}, {56,168}, {90,270} for our first few memory 3 pairs. Can you conjecture what the memory 4 pairs will look like? Hurry up - here they come!

kxyBase 10 representation
91716
1421139
1931572
24419115
............
5n+4n4n+3(5n+3)(n+1) [any base]

So we get memory 4 pairs {16,64}, {39,156}, {72, 288}, {115,460} - easy. It goes on, and the general formula for pairs of memory a is:

kxyValue
(a+1)n+anan+(a-1)((a+1)n+(a-1))(n+1)

I think that's pretty nice. So we're done, right? Well... not quite. Last week I explained why it wasn't possible to take one of the memory 2 pairs we'd found and divide or multiply both numbers by a constant to create a new pair. The issue was that the digits in memory 2 pairs have the form (x,y) = (n,2n+1), so if any number b>1 divides n exactly then it divides 2n+1 with remainder one, and that means (2n+1)/b isn't a whole number. But if we consider memory 3 pairs, their digits are (x,y) = (n,3n+2). There's a 2 on the end for that second digit now, so if n is divisible by 2, so is 3n+2. We can take any memory 3 pair whose n was even and divide the digits (in the specified base) by 2 to get a new pair. {30,90} with digits (2,8) (base 11) gives us {15,45} with digits (1,4). {90,270} with digits (4,14) (base 19) gives us {45,135} with digits (2,7).

We could do the same for pairs of memory 4, with digits (n,4n+3). Now whenever 3 divides n, we can not only divide all digits by 3 to get a new pair, but we can also multiply that result by 2 to get yet another one - the resulting digits won't be too big since we already divided by 3. So our pair {72,288} with base 19 digits (3,15) also gives us {24,96} with digits (1,5) and {48,192} with digits (2,10).

Since for any pair of memory a>2 the digits are (n,an+(a-1)), they all will admit some extra pairs for values of n that share common divisors with a-1. As it's only the case for certain generating values of n, and hence the bases (a+1)n+a, these bases and the pairs within them are something special - we'll call them 'memoir bases' and the pairs within them 'memoir sets'... because numbers in these bases have so many memories, they can write a book about them! Which are the most memoir-rich bases? They're the ones where the value of n used is equal to, or a multiple of, a-1, so they will only get larger and larger as the memory label increases. As for how many relatively memoir-rich bases we expect to see, that depends on how many factors a-1 has. Look at a detailed table for a = 7, for example:

kxyBase 10 representation
1511328
2322066

11033
31327120

21880

1940
39434190

21795
47541276
55648378

540315

432252

324189

216126

1863
63755576
............
8n+7n [highest for this base]7n+6 [highest for this base](8n+6)(n+1) [for highest (x,y)]

That's a big memoir set for base 55, generated by n = 6, but because a-1 = 6 has two factors, not just one, there are also smaller sets for the bases 23, 31 and 39 generated by n = 2, 3, 4 (and more, if we carried on past n = 7). Maybe it's interesting to consider which bases have the most memoirs if you add them all up over many different memories. For example, base 55 gets 6 memoirs for memory 7, but also 2 for memory 3 (since for memory 3, base 55 is generated by n = 18, which is divisible by 2). We'll see! We've started to re-frame part of the study of nostalgic pairs in terms of factors. I wonder whether primes/biprimes will turn up? (ha)

I have to say I'm immensely enjoying experimenting with this growing concept of nostalgic pairs. There's much more I want to say, and I will in the future, although to prevent this becoming the Nostalgic Pairs blog I may break it up a bit! Food for thought, though: is every number a member of some nostalgic pair? Or a slightly different question: is every number a base for a nostalgic pair of a certain memory? How well can we predict and summarise properties such as memoir size?

By the way, if you weren't sure whether or not to believe me about grabbing any piece of paper for maths extemporising, here's the result [click to enlarge] of my finding only blank white envelopes around the home to use as scrap:


I figure the more I find myself doing this kind of thing, the less people will want to write to me anyway!

No comments:

Post a Comment