How to compute $n$-th element in golomb's sequence? I've found that $A_n$ is approximately: $\phi^{2-\phi} * n^{\phi-1},\;\; \text{ where }\;\; \phi \;\;\text {is golden ratio}.$
As far as I checked with my python and C++ program it gives right answers for low numbers, but for high numbers like $10^9$ or $10^{18}$ it's totally wrong.
Is there another solution without computing so many numbers (even to $10^{18}$)?
Chris