Enigma 1771

Spoiler for New Scientist Enigma 1771: “Squares either way” (Follow the link to see the puzzle.)

For the first part the smallest and largest numbers that represent dates in either format are 010100 and 121299, whose square roots are 100+ and 348+. We could just examine the squares of all the numbers from 100 to 348, but let’s make it easier.

We want squares of the form 0x0xyz or 1x1xyz. For instance, are there any squares of the form 0101yz? Well, √010100 > 100 and √010199 < 101, so no. Likewise for all the other possibilities except: √040400 > 200 and √040499 < 202, so 2012 = 0404yz, specifically 040401, as stated in the enigma; and √070700 > 265 and √ 070799 < 267, so 2662 = 070756. So answer to part 1): 7 July 2056.

For the other two parts, we’re looking for the next (chronologically) square date in a particular format where the last two digits are the year. Here we can consider numbers up to 311299, whose square root is 557+, so we could examine the squares of all numbers from 100 to 557. Or we could be smart about it.

Is the next square date this year? No, because no square ends in 3.

Next year? Squares can end in 4. But you’d need to square a number of the form xy2 or uv8. In the first case the second to last digit of the square is 4y mod 10; in the second case it’s 16v+6 mod 10. Either way it’s even, so can’t be 1 to give us a date in 2014.

2015? Here the square root must be of the form xy5, and the second to last digit of the square of xy5 is 10y+2 mod 10 = 2. Not 1.

2016? Now we have xy4 or uv6. In the first case the second to last digit of the square is 8y+1 mod 10, and in the second case it’s 12v+3 mod 10. Either way, it’s odd. For it to be 1 we need y=0 or 5, or v=4 or 9. So we have the following candidate numbers: 104, 146, 154, 196, 204, 246, 254, 296, 304, 346, 354, 396, 404, 446, 454, 496, 504, 546, 554.

The squares of these numbers that constitute legal dates in one form or the other are: 010816, 021316, 041616, 060516, 092416. It’s coincidental, I think, that the squares of all the candidate numbers from 346 on up have large values for the middle two digits (32 or larger), whereas for all but 346 and 354 we would need the middle two digits to be 12 or less. For part 2), 060516 = 6 May 2016 is the next day:month:year square date (and the only other such square date in 2016 is 1 August). For part 3), 010816 = 8 Jan 2016 is the next month:day:year square date (and the other square dates are 13 Feb, 16 Apr, 5 Jun, and 24 Sep).

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s