Sujet : Re: The "Strand" puzzle --- ( Continued Fractions using Lisp orPython? )
De : droleary.usenet (at) *nospam* 2023.impossiblystupid.com (Doc O'Leary ,)
Groupes : rec.puzzlesDate : 02. Aug 2024, 17:55:06
Autres entêtes
Organisation : Subsume Technologies, Inc.
Message-ID : <v8j31a$2tsqp$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : com.subsume.NNTP/1.0.0
For your reference, records indicate that
Doc O'Leary , <
droleary@2017usenet1.subsume.com> wrote:
Hmmm. Not sure why it was using my old email. Anyway!
So no house. I’ll skip the full output, but for the tipping point I see:
irb> (x..y).select {|n| puts "#{n} #{(x..(n-1)).sum} #{((n+1)..y).sum}"}
355 61610 62060
356 61965 61704
I went a step further and figured out the equation to solve the puzzle.
Implemented in Ruby:
irb> range_sum_midpoint(1,8)
=> 6.0
irb> range_sum_midpoint(50,500)
=> 355.6332380416656
The equation itself is left as an exercise for the rec.puzzles reader. :-)
-- "Also . . . I can kill you with my brain."River Tam, Trash, Firefly