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

Home > Numbers
Pandigital concatenations (Posted on 2014-05-10) Difficulty: 3 of 5
What is the smallest integer n such that a concatenation of n2 and n3 contains each of the ten decimal digits exactly once?

What is the smallest integer m, m>n such that a concatenation of m2 and m3 contains each of the ten decimal digits once and some of them more than once?

Please provide few additional(i.e. not smallest) samples for both cases.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solutions Comment 1 of 1
There is only one value for n, shown below, above the row of hyphens, together with n^2 and n^3.

For m, all values below 1000 are shown (just ignore the first line where m = n, contrary to the specific rule) below the row of hyphens.

 69     4761  328509  Smallest and only value for n
---------------
 69     4761  328509
 128     16384  2097152  Smallest value for m
 203     41209  8365427
 302     91204  27543608
 327     106929  34965783
 366     133956  49027896
 398     158404  63044792
 467     218089  101847563
 542     293764  159220088
 591     349281  206425071
 593     351649  208527857
 598     357604  213847192
 633     400689  253636137
 643     413449  265847707
 669     447561  299418309
 690     476100  328509000
 747     558009  416832723
 759     576081  437245479
 903     815409  736314327
 923     851929  786330467
 943     889249  838561807
 
DefDbl A-Z

Private Sub Form_Load()
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 For n = 9 To 999
   n2$ = LTrim(Str(n * n))
   n3$ = LTrim(Str(n * n * n))
   combo$ = n2$ + n3$
   If Len(combo$) = 10 Then
     good = 1
     For i = 1 To Len(combo$)
       If InStr(Mid(combo$, i + 1), Mid(combo$, i, 1)) > 0 Then good = 0: Exit For
     Next
     If good Then Text1.Text = Text1.Text & Str(n) & "     " & n2$ & "  " & n3$ & crlf$: Form1.Visible = True: DoEvents
   End If
 Next
 
 Text1.Text = Text1.Text & "---------------" & crlf$
 
  For n = 9 To 999
   n2$ = LTrim(Str(n * n))
   n3$ = LTrim(Str(n * n * n))
   combo$ = n2$ + n3$
   ct = 0
   For i = 1 To Len(combo$)
      If InStr(combo$, Mid(combo$, i, 1)) = i Then ct = ct + 1
   Next
   If ct = 10 Then Text1.Text = Text1.Text & Str(n) & "     " & n2$ & "  " & n3$ & crlf$: Form1.Visible = True: DoEvents
 Next
End Sub

 

  Posted by Charlie on 2014-05-10 15:55:51
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 (3)
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