define $a@b=\frac{b^2+3a}{a+33b},$ calculate (1@2@...@100)×3303

125 Views Asked by At

Find the following question in a middle school math competition:

define $a@b=\frac{b^2+3a}{a+33b}$, then what is $(1@2@3@\cdots@100)\times3303$?

If we assume that $1@2@3=(1@2)@3$, the code below is what I end up with to solve the question:

# Define the function a@b
def at_operator(a, b):
    return (b**2 + 3*a) / (a + 33*b)

# Calculate 1@2@3@...@100
result = 1
for i in range(2, 101):
    result = at_operator(result, i)

result*3303

The answer is surprisingly simple: 10009. I tried to make sense out of it by working out x@(x+1), x@(x+1)@(x+2), and x@(x+1)@(x+2)@(x+3), and it is:

$$ x@(x+1)=\frac{\left(\left(x+1\right)^2+3x\right)}{\left(x+33\left(x+1\right)\right)} $$

$$ x@(x+1)@(x+2)=\frac{34 x^3+172 x^2+283 x+135}{1123 x^2+3338 x+2179}. $$

$$ x@(x+1)@(x+2)@(x+3)=\frac{1123 x^4+10178 x^3+32830 x^2+43965 x+20016}{37093 x^3+221503 x^2+402652 x+215856} $$

for x=1, they are $\frac{7}{67}$, $\frac{627}{6640}$, and $\frac{108112}{877104}$. The sequence is getting better... any hints will be appreciated...

1

There are 1 best solutions below

1
On BEST ANSWER

The operation $@$ is mostly terrible with no pattern to it. However, if we rewrite it as $$a \mathbin{@} b = 3 \cdot \frac{3a+b^2}{3a+99b}$$ then it is easier to find a small spot of order in the chaos: we have $3a+b^2 = 3a+99b$ when $b=99$, so $$a \mathbin{@} 99 = 3 \cdot \frac{3a+99^2}{3a+99^2} = 3$$ for all $a$.

As a result, we can ignore the quantity $x = 1 \mathbin{@} 2 \mathbin{@} 3 \mathbin{@} \cdots \mathbin{@} 98$, which will probably not simplify nicely. The expression we're asked to evaluate is $$(x \mathbin{@} 99 \mathbin{@} 100) \cdot 3303 = (3 \mathbin{@} 100) \cdot 3303 = \frac{100^2 + 9}{3 + 3300} \cdot 3303 = 10009.$$