This is the robbers' thread. See the cops' thread here.
In this cops and robbers challenge, the cops will be tasked with writing an algorithm that computes some function of their choice, while the robbers will try to come up with their algorithm. The catch is, the 'algorithm' must be a single closed-form mathematical expression. Remarkably, a function that determines whether a number is prime has been shown to be possible using only Python operators.
Your goal as the robber is to crack the cops' submissions. To begin, pick any submission from the cops' thread that isn't marked as safe and is less than a week old. The submission should contain an OEIS sequence and a byte count representing the length of the intended expression. To submit a crack, write a single closed-form expression that takes an integer
n, and provably computes the
nth term of this sequence. You only need to handle
n for which the sequence is defined.
In addition, pay attention to the offset of the OEIS sequence. If the offset is
0, the first term should be evaluated at
n=0. If the offset is
1, it should be evaluated at
The specification for the closed-form expression is described in detail in the cops' thread.
Your expression must be at most twice the length of their expression to be considered a crack. This is to ensure that you can't crack their submission with an overly long expression. Bonus points if you are able to match or reduce their byte count.
Your score is the number of answers you have cracked, with more cracks being better.
A000225, 6 bytes, cracks @user's answer