There exists a number oddity with 3 different 4-digit numbers. One is 9801, where (98 + 01)^2 = 9801. It also works with 3025: (30+25)^2 = 3025.
What is the other number?
What is the smallest 6-digit number that would work?
(in other words, in a 6-digit number abcdef: abcdef=(abc+def)^2)
This simple QBasic code finds all the numbers very quickly:
PRINT "Solutions for 4 digits:"
FOR i% = 1000 TO 9999
IF (INT(i% / 100) + (i% - (INT(i% / 100) * 100))) * (INT(i% / 100) + (i% - (INT(i% / 100) * 100))) = i% THEN
PRINT i%
END IF
NEXT i%
PRINT "Solutions for 6 digits:"
FOR i& = 100000 TO 999999
IF (INT(i& / 1000) + (i& - (INT(i& / 1000) * 1000))) * (INT(i& / 1000) + (i& - (INT(i& / 1000) * 1000))) = i& THEN
PRINT i&
END IF
NEXT i&
And the output:
Solutions for 4 digits:
2025
3025
9801
Solutions for 6 digits:
494209
998001