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.)
re: computer solution | Comment 2 of 5 |
(In reply to computer solution by Charlie)

I translated the program into Mintoris Basic as shown below and it took 2.523 seconds to run on a Samsung Galaxy S7. That's faster than UBASIC emulated in Windows under DOSBox but slower than UBASIC would be running natively, say in Windows XP.

t=time()
open 1,"wtsomtim.txt","w"


dim S$(5)
dim S0$(5)

S0$(1)="260723233115686*1931"
S0$(2)="43744839742282591947"
S0$(3)="1181326544136*5138222"
S0$(4)="186378732807587076747"
S0$(5)="519650114814905002347"

for A=0 to 9
for B=0 to 9
  for I=1 to 5
    S$(I)=S0$(I)
  next
  Ix1=instr(S$(1),"*",1)
  mid$(S$(1),Ix1,1)=trim$(str$(A))
  Ix1=instr(S$(3),"*",1)
  mid$(S$(3),Ix1,1)=trim$(str$(B))
 
  Good=1
  for I=1 to 3
  for J=I+1 to 4
  for K=J+1 to 5
     Tot$=bigAdd$(bigAdd$(S$(I),S$(J)),S$(K))
     Sr$=bigFloor$(bigAdd$(bigSqrt$(Tot$),"0.5"))
     if bigMult$(Sr$,Sr$)<>Tot$ then Good=0
  next
  next
  next
 
  if Good then
   for I=1 to 3
   for J=I+1 to 4
   for K=J+1 to 5
     Tot$=bigAdd$(bigAdd$(S$(I),S$(J)),S$(K))
     Sr$=bigFloor$(bigAdd$(bigSqrt$(Tot$),"0.5"))
     writeln 1,S$(I)
     writeln 1,S$(J)
     writeln 1,S$(K)
     writeln 1,Tot$+"  "+Sr$
   next
   next
   next
   writeln 1," "
  endif
 
next B
next A
print str$((time()-t)/1000)
close 1

Again, manual formatting was done:

 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
 


  Posted by Charlie on 2018-05-19 11:51:47
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