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

Home > Just Math
1-2-3 Square Settlement (Posted on 2015-11-27) Difficulty: 3 of 5
N is a perfect square containing precisely one 3, two 2’s and three 1’s. Any of the other seven digits may or may not occur in N.

Determine the smallest two values of N.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution -- smallest nine values | Comment 1 of 3
sqrt(N)  N  
3361  11296321
3483 12131289
3596 12931216
3623 13126129
3889 15124321
4373 19123129
4649 21613201
5489 30129121
5579 31125241

DefDbl A-Z  
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For sr = 317 To 9999
   DoEvents
   sq$ = LTrim(Str(sr * sr))
   ReDim ct(9)
   For i = 1 To Len(sq)
    ct(Val(Mid(sq, i, 1))) = ct(Val(Mid(sq, i, 1))) + 1
   Next
   If ct(1) = 3 And ct(2) = 2 And ct(3) = 1 Then
     Text1.Text = Text1.Text & sr & "  " & sq & crlf
   End If
 Next


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

Edited on November 28, 2015, 8:56 am
  Posted by Charlie on 2015-11-27 15:30:18

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


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

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