By adding 1 to the non leading zeros number N = AAABBBCCC, it becomes a square. Find N.
A, B, and C are different digits.
Note: While a solution is trivial with the aid of a computer program, show how to derive it without one.
Having seen this prior to publication, and realising the futility of a spreadsheet, I compiled the program listing below (QuickBasic) and passed it on.
That we might see how computer power may resolve issues, and it is not to be derided, I am glad that pcbouhid's note reads as it does.
I trust that those yet without this knowledge can benefit from the insights brought by Dej Mar and K Senguptna from their discipline base.
----------------------------------------------------------------------
CLS
FOR a = 0 TO 9
FOR b = 0 TO 9
FOR c = 0 TO 9
IF (a <> b AND b <> c AND a <> c) THEN
N = a * 10 ^ 8 + a * 10 ^ 7 + a * 10 ^ 6 + b * 10 ^ 5 + b * 10 ^
4 + b * 10 ^ 3 + c * 10 ^ 2 + c * 10 + c
IF SQR(N + 1) = INT(SQR(N + 1)) THEN PRINT a, b, c
END IF
NEXT
NEXT
NEXT
-------------------------------------
This gave me:
0, 1, 5
0, 4, 8 and
1, 9, 8
-----------------------------------------
I could have gotten just the one result by starting
"a" at 1
rather than 0.
|
Posted by brianjn
on 2008-07-18 00:35:17 |