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

Home > Numbers
SOD cubed equals Sum of Squares of SODs (Posted on 2019-11-20) Difficulty: 3 of 5
Find all 2 digit base 10 integer pairs (X, Y) such that:

  • Y is not larger than X
  • (sod(X*Y))^3 equals (sod(X))^2 + (sod(Y))^2
... where sod(n) indicates the sum of digits of n

See The Solution Submitted by Larry    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer-aided solution | Comment 2 of 4 |
x  y  x*y  (sod(x*y))^3
           (sod(x))^2+(sod(y))^2
73 14 1022 125
50 28 1400 125
50 46 2300 125
64 50 3200 125
82 50 4100 125



DefDbl A-Z
Dim crlf$

Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For y = 10 To 99
   For x = y To 99
     tst1 = sod(x * y)
     tst1 = tst1 * tst1 * tst1
     sx = sod(x): sy = sod(y)
     tst2 = sx * sx + sy * sy
     If tst1 = tst2 Then
       Text1.Text = Text1.Text & x & Str(y) & Str(x * y) & Str(tst1) & crlf
     End If
     DoEvents
   Next x
 Next y
  
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

Function sod(n)
  s$ = LTrim(Str(n))
  tot = 0
  For i = 1 To Len(s$)
   tot = tot + Val(Mid(s$, i, 1))
  Next
  sod = tot
End Function

Edited on November 20, 2019, 2:16 pm
  Posted by Charlie on 2019-11-20 14:15:56

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (24)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information