## Snake Arithmetic

The good thing: I get consistent results with small error rates. (Java same result as Python)

The bad thing: The last three digits are varying.

At some point (~85000000 iterations) the value of the answer does not change anymore.

I get there quite fast.

How do I check, whether my sum is "correct"?

I could bruteforce the last three digits, but that is #%&$§.

Am I missing something here?

This challenge is my nemesis.

I love math, always have, and I started tackling this challenge for the first time when I was around 16/17 years old (more or less when I created my account here). From there on I started doing challenges occasionally, and every 1 or 2 years I come back here, to see if I have improved in some sense (usually I manage to do 2/3 challenges each time). Every time I try to do this one, and every time I come closer and closer, without actually managing to.

It angers me, because I KNOW it's easy, I KNOW the solution is before my eyes, but I cannot see it.

This time, after almost ten years from the first time I tackled this (and around 30/40 hours of fiddling with numbers and formulas), I give up. And by give up, I mean that I ask for some tips on this forum.

I managed to come up with a decent formula for N(x)/D(x), but it still is recursive. I translated it into a series, hoping I didn't do any math error along the way.

Now since this series still loops x/2 times, I need to unravel it. It seems the last step but really, I can't find the way to do it.

I'm not sayinmg too much to not spoil for others, but how can I do this last step? Should it be obvious? Have I made a mistake in rewriting the formula into a series? (although the result seems to work correctly for me for low numbers)