Discussion:
The "Strand" puzzle
(too old to reply)
HenHanna
2024-07-25 19:07:56 UTC
Permalink
e.g. -------- For the (street) Numbers (1,2,3,4,5,6,7,8)

(1,2,3,4,5) and (7,8) both add up to 15.



“In a given street of houses with consecutive numbers between 50 and
500, find the house number, for which, the sum of numbers on the left is
equal to the sum of numbers on the right”



Ramanujan and Strand Puzzle

this was a very interesting puzzle tackled by the genius
Srinivasa Ramanujan. In the year 1914, P.C. Mahalanobis, a Kings
college student in England, got hold of a puzzle from the Strand magazine.
IlanMayer
2024-07-26 12:37:49 UTC
Permalink
Post by HenHanna
e.g. -------- For the (street) Numbers (1,2,3,4,5,6,7,8)
(1,2,3,4,5) and (7,8) both add up to 15.
“In a given street of houses with consecutive numbers between 50 and
500, find the house number, for which, the sum of numbers on the left is
equal to the sum of numbers on the right”
Ramanujan and Strand Puzzle
this was a very interesting puzzle tackled by the genius
Srinivasa Ramanujan. In the year 1914, P.C. Mahalanobis, a Kings
college student in England, got hold of a puzzle from the Strand magazine.
Solution found at:
https://ubpdqnmathematica.wordpress.com/2021/12/05/ramanujan-and-strand-puzzle/
HenHanna
2024-07-29 18:58:21 UTC
Permalink
Post by IlanMayer
e.g. -------- For the (street)  Numbers (1,2,3,4,5,6,7,8)
                         (1,2,3,4,5)  and  (7,8)  both add up to 15.
“In a given street of houses with consecutive numbers between 50 and
500, find the house number, for which, the sum of numbers on the left is
equal to the sum of numbers on the right”
  Ramanujan and Strand Puzzle
            this was a very interesting puzzle tackled by the genius
Srinivasa Ramanujan.        In the year 1914, P.C. Mahalanobis, a Kings
college student in England, got hold of a puzzle from the Strand magazine.
https://ubpdqnmathematica.wordpress.com/2021/12/05/ramanujan-and-strand-puzzle/
thanks!
Post by IlanMayer
So the solutions to the Strand puzzle can be found from the
continued fraction of \sqrt{2}, which _is_ satisfying simple.
Post by IlanMayer
Using Mathematica to look at the first 10 convergents
---------- is this (also) easy to do using Lisp or Python???
HenHanna
2024-07-31 05:27:23 UTC
Permalink
Post by HenHanna
Post by IlanMayer
e.g. -------- For the (street)  Numbers (1,2,3,4,5,6,7,8)
                         (1,2,3,4,5)  and  (7,8)  both add up to 15.
“In a given street of houses with consecutive numbers between 50 and
500, find the house number, for which, the sum of numbers on the left is
equal to the sum of numbers on the right”
  Ramanujan and Strand Puzzle
            this was a very interesting puzzle tackled by the genius
Srinivasa Ramanujan.        In the year 1914, P.C. Mahalanobis, a Kings
college student in England, got hold of a puzzle from the Strand magazine.
https://ubpdqnmathematica.wordpress.com/2021/12/05/ramanujan-and-
strand-puzzle/
thanks!
 >>>    So the solutions to the Strand puzzle can be found from the
continued fraction of \sqrt{2}, which  _is_  satisfying simple.
 >>>   Using Mathematica to look at the first 10 convergents
---------- is this (also) easy to do using Lisp or Python???
N = 10
a = 1
b = 1
print(str(a) + "/" + str(b))
   temp = a + 2 * b
   b = a + b
   a = temp
   print(str(a) + "/" + str(b))
thanks! i've been reading about Ramanujan for 30+ years
and a few days ago, i watched a clip by Cindy Pom that
taught me a few new key things... like ...
He was married to a young girl when he moved to England.

He didn't want to travel to England because...........

______________
in Ramanujan's 1st letter to Hardy

1-2+3-4+5-6= ............

Are there just 4 formulas like this? Or are there dozens more?
B. Pym
2024-08-01 09:33:53 UTC
Permalink
e.g. -------- For the (street)  Numbers (1,2,3,4,5,6,7,8)
       (1,2,3,4,5)  and  (7,8)  both add up to 15.
"In a given street of houses with consecutive numbers between
50 and 500, find the house number, for which, the sum of
numbers on the left is equal to the sum of numbers on the
right"
Gauche Scheme

(define (strand lst)
(let go ((left-sum 0) (tail lst))
(if (null? tail)
#f
(let ((right-sum (fold + 0 (cdr tail))))
(cond ((< left-sum right-sum)
(go (+ left-sum (car tail)) (cdr tail)))
((= left-sum right-sum) (car tail))
(#t #f))))))

(strand '(1 2 3 4 5 6 7 8))
===>
6

(lrange 2 5)
===>
(2 3 4)

(any
(lambda (n)
(if (strand (lrange 50 n))
n
#f))
(lrange 500 50 -1))
===>
352

(strand (lrange 50 352))
===>
251
HenHanna
2024-08-01 19:47:30 UTC
Permalink
Post by B. Pym
e.g. -------- For the (street)  Numbers (1,2,3,4,5,6,7,8)
       (1,2,3,4,5)  and  (7,8)  both add up to 15.
"In a given street of houses with consecutive numbers between
50 and 500, find the house number, for which, the sum of
numbers on the left is equal to the sum of numbers on the
right"
Gauche Scheme
(define (strand lst)
(let go ((left-sum 0) (tail lst))
(if (null? tail)
#f
(let ((right-sum (fold + 0 (cdr tail))))
(cond ((< left-sum right-sum)
(go (+ left-sum (car tail)) (cdr tail)))
((= left-sum right-sum) (car tail))
(#t #f))))))
(strand '(1 2 3 4 5 6 7 8))
===>
6
(lrange 2 5)
===>
(2 3 4)
(any
(lambda (n)
(if (strand (lrange 50 n))
n
#f))
(lrange 500 50 -1))
===>
352
(strand (lrange 50 352))
===>
251
does your Newsreader set Followup-to automatically?
pls disable it.




i still don't see how the prob is related to the Continued Fraction.



if this Continued Fraction is written as [2,1] with a bar over 1 (?)

What does [3,1] correspond to?
Moebius
2024-08-01 19:50:51 UTC
Permalink
Post by B. Pym
e.g. -------- For the (street)  Numbers (1,2,3,4,5,6,7,8)
        (1,2,3,4,5)  and  (7,8)  both add up to 15.
"In a given street of houses with consecutive numbers between
50 and 500, find the house number, for which, the sum of
numbers on the left is equal to the sum of numbers on the
right"
Gauche Scheme
(define (strand lst)
   (let go ((left-sum 0) (tail lst))
     (if (null? tail)
       #f
       (let ((right-sum (fold + 0 (cdr tail))))
         (cond ((< left-sum right-sum)
                (go (+ left-sum (car tail)) (cdr tail)))
               ((= left-sum right-sum) (car tail))
               (#t #f))))))
(strand '(1 2 3 4 5 6 7 8))
   ===>
6
(lrange 2 5)
   ===>
(2 3 4)
(any
   (lambda (n)
     (if (strand (lrange 50 n))
       n
       #f))
   (lrange 500 50 -1))
   ===>
352
(strand (lrange 50 352))
   ===>
251
              does your Newsreader  set  Followup-to automatically?
                       pls  disable it.
https://vasya10.wordpress.com/2012/01/11/groovy-olc-2-strand-puzzle-1914/
i still don't see how the prob is related to the Continued  Fraction.
Loading...