Determine all possible 7-digit decimal (base 10) perfect square(s), each of whose digits is nonzero and even.
Note: While a solution is trivial with the aid of a computer program, show how to derive it without one.
(In reply to SLOANE A103705
by Ady TZIDON)
1. Isn't it A030098? ... or A103751?
2. Now that a computer program is being used (IE, Firefox or Chrome), might as well do one tailored to the task instead:
st = INT(SQR(1000000)): fin = INT(SQR(9999999))
FOR sr = st TO fin
sq = sr * sr
s$ = LTRIM$(STR$(sq))
good = 1
FOR i = 1 TO LEN(s$)
IF INSTR("2468", MID$(s$, i, 1)) = 0 THEN good = 0: EXIT FOR
IF good THEN PRINT s$
I would be interested in how one could do this with no computer.
Edited on October 25, 2008, 5:10 pm
Edited on October 26, 2008, 1:56 am
Posted by Charlie
on 2008-10-25 17:05:34