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

Home > Numbers
Will take some time ?? (Posted on 2018-05-18) Difficulty: 4 of 5
Found on the web:
begin
260723233115686*1931
43744839742282591947
1181326544136*5138222
186378732807587076747
519650114814905002347

Any three of these numbers add up to a perfect square.
end

I have no means to check whether it is a true statement and revised
just 3 possible combinations by adding mod 100 the 2 last digits, i.e. 47+47+47= 41, 47+47+22=96 and 47+47+31=25.
I leave it to the solvers to check the 10 possible combinations and to explain what means were used and what was the runtime.
To make it more interesting 2 distinct digits I've replaced by an asterisk "*".

Have fun finding if the statement is true!
If so - for what values of the asterisks?

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 5
About 2 hours to develop and debug the program and 4.726 seconds to run it.

The program is written in UBASIC, which provides more than enough precision to do the arithmetic on numbers of these lengths. The interpreter for that version of Basic is a DOS program so it necessitated running under the DOSBox emulator, as firing up the old XP machine, which ran DOS programs natively, was not worthwhile for shortening the 4.726 second run time (estimate it would have taken about a quarter or a fifth of a second as speed would have been about 20x faster).

The ten square roots appear to the right of each total, which in turn appears under the three summands which comprise it. The first and second *'s are 6 and 7 respectively.  

I've done some manual alignment in the output below:

  26072323311568661931
  43744839742282591947
 118132654413675138222
 187949817467526392100   13709479110
 
  26072323311568661931
  43744839742282591947
 186378732807587076747
 256195895861438330625   16006120575
 
  26072323311568661931
  43744839742282591947
 519650114814905002347
 589467277868756256225   24278947215
 
  26072323311568661931
 118132654413675138222
 186378732807587076747
 330583710532830876900   18181961130
 
  26072323311568661931
 118132654413675138222
 519650114814905002347
 663855092540148802500   25765385550
 
  26072323311568661931
 186378732807587076747
 519650114814905002347
 732101170934060741025   27057368145
 
  43744839742282591947
 118132654413675138222
 186378732807587076747
 348256226963544806916   18661624446
 
  43744839742282591947
 118132654413675138222
 519650114814905002347
 681527608970862732516   26106083754
 
  43744839742282591947
 186378732807587076747
 519650114814905002347
 749773687364774671041   27381995679
 
 118132654413675138222
 186378732807587076747
 519650114814905002347
 824161502036167217316   28708213146 

 4.726 


    5   clr time
   10    kill "wtsomtim.txt":open "wtsomtim.txt" for output as #1
   20  
   30  
   40    dim S$(5),S0$(5)
   50   
   60    S0$(1)="260723233115686*1931"
   70    S0$(2)="43744839742282591947"
   80    S0$(3)="1181326544136*5138222"
   90    S0$(4)="186378732807587076747"
  100    S0$(5)="519650114814905002347"
  110   
  120    for A=0 to 9
  130    for B=0 to 9
  140      for I=1 to 5
  150        S$(I)=S0$(I)
  160      next
  170      Ix1=instr(S$(1),"*")
  180      mid(S$(1),Ix1,1)=cutspc(str(A))
  190      Ix1=instr(S$(3),"*")
  200      mid(S$(3),Ix1,1)=cutspc(str(B))
  210     
  220      Good=1
  230      for I=1 to 3
  240      for J=I+1 to 4
  250      for K=J+1 to 5
  260         Tot=val(S$(I))+val(S$(J))+val(S$(K))
  270         Sr=int(sqrt(Tot)+0.5)
  280         if Sr*Sr<>Tot then Good=0
  290      next
  300      next
  310      next
  320     
  330      if Good then
  340      :for I=1 to 3
  350      :for J=I+1 to 4
  360      :for K=J+1 to 5
  370        :Tot=val(S$(I))+val(S$(J))+val(S$(K))
  380        :Sr=int(sqrt(Tot)+0.5)
  390        :print #1,S$(I)
  400        :print #1,S$(J)
  410        :print #1,S$(K)
  420        :print #1,Tot,Sr
  430      :next
  440      :next
  450      :next
  455      :print #1,
  470     
  480    next B
  490    next A
  500    print #1,time1000/1000
  510    close #1


  Posted by Charlie on 2018-05-18 13:41: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 (6)
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