Mathematics Asked by user842445 on December 20, 2020
Place any number of parentheses into this expression to get the number $256/63$
$$1div2div3div4div5div6div7div8div9div10$$
I was able to get $63/256$, but I don’t know how I would get the reciprocal.
You can't do it. You need all the even numbers in the numerator, to produce $256=2^8$. In particular, $2$ has to be in the numerator. But no arrangment of parentheses can make that happen.
Answered by TonyK on December 20, 2020
Just to make sure there is no mistake in an argument, here is a Python program which does the brute force search:
def gcd(x, y):
if x<y: return gcd(y,x)
if y==0: return x
return gcd(y, x%y)
def fracs(lower, upper):
if lower == upper:
yield lower, 1, str(lower)
for i in range(lower, upper):
for n1, d1, s1 in fracs(lower, i):
for n2, d2, s2 in fracs(i+1, upper):
g = gcd(n1*d2, n2*d1)
yield n1*d2//g, n2*d1//g, f"({s1}/{s2})"
for n, d, s in fracs(1, 10):
print(f"{n}/{d} : {s}")
Intuitively, $text{fracs}(i,j)$ produces (yields) the results as triplets (numerator, denominator, string expression) for a problem $idiv(i+1)divcdotsdiv(j-1)div j$, and so it is launched as $text{fracs}(1,10)$.
Sure enough, the output has $4862$ lines ($9$th Catalan number), and many of them ($143$ of them) are showing $63/256$, e.g.:
63/256 : (1/(2/(3/(4/(5/(6/(7/(8/(9/10)))))))))
but there are none showing $256/63$.
Answered by Stinking Bishop on December 20, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP