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

 Nine times SSD (Posted on 2015-03-30)
Determine all possible positive integers N such that:
N = 9*SSD(N), where SSD(N) denotes the sum of squares of the base ten digits of N.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 1 of 1
Text1.Text = ""
crlf\$ = Chr(13) + Chr(10)
Form1.Visible = True

For n = 1 To 100000
If n / ssd(n) = 9 Then
Text1.Text = Text1.Text & n & Str(ssd(n)) & crlf
DoEvents
End If
Next n

Text1.Text = Text1.Text & "done" & crlf

End Sub

Function ssd(x)
tot = 0
s\$ = LTrim(Str(x))
For i = 1 To Len(s)
d = Val(Mid(s, i, 1))
tot = tot + d * d
Next
ssd = tot
End Function

finds only

315 35

where N=315 and SSD(N) = 35.

All numbers through 5-digit length were checked. Beyond that, such an equality would be impossible as 9*(9^2)*6 is only a 4-digit number (4374).

 Posted by Charlie on 2015-03-30 22:04:20

 Search: Search body:
Forums (0)