# Proof of forumla for upper s-Wuthoff sequence

During my work on sequencedb.net I bump into generated formulas that doesn’t exist in the Online Encyclopedia of Integer Sequences (oeis.org). Lately, I’ve started to submit them whenever I got some time over.

I recently proposed a formula for

A184517 Upper s-Wythoff sequence, where s=4n-2.

The discovered formula is simple

$a(n)=\lceil\Delta((n\phi)^2)\rceil$

Where $\Delta$ is the difference between the terms, to rewrite it without an explicit delta function we can rewrite it as

$a(n)=\lceil n^2\phi^2 - (n-1)^2\phi^2\rceil = \lceil \phi^2(n^2 - (n-1)^2)\rceil$ so we get

$a(n)=\lceil \phi^2(2n-1))\rceil$

This is the formula I proposed after testing it against 10^6 first terms of A184517. An editor asked me if I could prove it which is a very good question since I hadn’t marked it as an empirical finding. Since the formula involves decimals, floor and ceiling it would certainly be comforting with a proof!

Looking in the program section of the entry, we can find the current formula used to generate the sequence, a bit simplified it can be written as

$b(n)=\left\lfloor\frac{1}{2}(\sqrt{20}+6)(n-\frac{2}{2+\sqrt{20}} \right\rfloor$

Now assuming this formula is correct, we need to prove that the new formula, $a(n)=b(n)$.

Let’s start by simplifying $b(n)$ by setting $\sqrt{20}=2\sqrt5$ this is our connection to the Golden Ratio, $phi=\frac{1+\sqrt5}{2}$.

$b(n)=\left\lfloor\frac{1}{2}(2\sqrt{5}+6)(n-\frac{2}{2+2\sqrt{5}} \right\rfloor$

Then we simplify it further, by removing some obvious cancellable terms

$b(n)=\left\lfloor(\sqrt{5}+3)(n-\frac{1}{1+\sqrt5}\right\rfloor$

Focusing on whatever is inside the floor

$(\sqrt{5}+3)(n-\frac{\sqrt5-1}{4})$

With some further reworking we get to

$n(3 + \sqrt5) - \phi$

Now we make a leap of faith and hope that whatever is inside the floor and ceiling is exactly $1$ apart

$n(3 + \sqrt5) - \phi-1=\phi^2(2n-1)$

Recall that $\phi+1=\phi^2$ so on the lhs we get

$n(3+\sqrt5​)−ϕ^2$

where $\phi^2=\frac{3+\sqrt5}{2}$

Factoring out out $3+\sqrt5$ gives us
$(3+\sqrt5)(n-\frac{1}{2})$

Dividing it by two and multiplying the n part with 2 finally gives us

$(2n-1)\frac{(3+\sqrt5)}{2}=(2n-1)\phi^2$

So we have proven that the expression inside the floor of $b(n)$ minus 1 equals the ceiling of $a(n)$, hence they are the same.

I am sure this took far too many steps and detours before arriving at the conclusion - but I don’t want to spend too much time on this.

Written with StackEdit.