During the course of the year 2000, two brothers Andrew and Brady set out to research the family tree and began by listing the dates of birth of all the family members born during the period covering January 1, 1900 to December 31, 1999 inclusively.
Each date was recorded as three pairs of digits, written in succession to form a positive six digit decimal integer with a zero preceding any single digit day, month or year. Andrew followed the dd-mm-yy format, while Brady followed the mm-dd-yy format. For example, May 7, 1998 would be written as 070598 and 050798 respectively by Andrew and Brady.
Comparing the two different integers representing Chloe’s birth date, they noticed that one of them was a perfect square, and the absolute difference between them was a nonzero perfect square. The same was true for their versions of the birth date of Chloe’s sister Denise, who is younger by between one and two years.
When was Chloe born? What was the birth date of Denise?
Note: Try to derive a non computer-assisted solution, although computer program/spreadsheet solutions are welcome.
The following lists the dates within the 1900's in which the given conditions hold. They are listed as YYMMDD, as that's the format Charlie uses.
160213 146 * 146 = 21316 330 * 330 = 108900
240718 268 * 268 = 71824 330 * 330 = 108900
251122 335 * 335 = 112225 330 * 330 = 108900
360112 106 * 106 = 11236 330 * 330 = 108900
361201 106 * 106 = 11236 330 * 330 = 108900
We need two that are a year or more apart but two years or less apart. That's the pair 240718 and 251122. (In the usual accounting of integral ages, the 1936 pair would work most of the time as being one year apart, but the context of this problem seems to require that they're consedered less than a year apart.)
Since Denise is the younger, she was born 1924 July 18. Chloe was born 1925 November 22.
FOR i = 1 TO 12: READ moLen(i): NEXT
FOR ye = 0 TO 99
y$ = RIGHT$("0" + LTRIM$(STR$(ye)), 2)
FOR mo = 1 TO 12
m$ = RIGHT$("0" + LTRIM$(STR$(mo)), 2)
lastDay = moLen(mo)
IF ye MOD 4 = 0 AND ye > 0 AND mo = 2 THEN lastDay = 29
FOR da = 1 TO lastDay
d$ = RIGHT$("0" + LTRIM$(STR$(da)), 2)
a$ = d$ + m$ + y$
b$ = m$ + d$ + y$
aVal = VAL(a$)
bVal = VAL(b$)
sr1 = INT(SQR(aVal) + .5)
sr2 = INT(SQR(bVal) + .5)
IF sr1 * sr1 = aVal OR sr2 * sr2 = bVal THEN
diff = ABS(bVal - aVal)
sr = INT(SQR(diff) + .5)
IF sr * sr = diff AND diff > 0 THEN
PRINT y$; m$; d$,
IF sr1 * sr1 = aVal THEN PRINT sr1; "*"; sr1; "="; aVal,
IF sr2 * sr2 = bVal THEN PRINT sr2; "*"; sr2; "="; bVal,
PRINT sr; "*"; sr; "="; diff
Posted by Charlie
on 2008-12-23 13:36:59