All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Special Numbers (Posted on 2004-04-03)
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)

 See The Solution Submitted by Victor Zapana Rating: 3.6667 (6 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 1 of 18

The program:

DEFDBL A-Z
CLS
FOR n = 1000 TO 9999
n\$ = RIGHT\$(LTRIM\$(STR\$(n)), 4)
a\$ = LEFT\$(n\$, 2)
b\$ = RIGHT\$(n\$, 2)
t = VAL(a\$) + VAL(b\$)
IF t * t = n THEN PRINT n
NEXT
FOR n = 100000 TO 999999
n\$ = RIGHT\$(LTRIM\$(STR\$(n)), 6)
a\$ = LEFT\$(n\$, 3)
b\$ = RIGHT\$(n\$, 3)
t = VAL(a\$) + VAL(b\$)
IF t * t = n THEN PRINT n
NEXT

finds

2025
3025
9801
494209
998001

 Posted by Charlie on 2004-04-03 10:34:56

 Search: Search body:
Forums (0)