This is a Cops and Robbers challenge. For the Cops' thread, go here.

The Cops have three tasks.
1) Pick a sequence from the OEIS.

2) Pick a language (this is suggested to be a golflang, but doesn't have to be) that, when given input n, outputs A(n) (where A(n) is the sequence chosen) using all usual rules.
Call this language LA and code CA.
For example, Jelly and Jelly_code.

3) Then, pick a different language (this is suggested to be a non-golflang, but doesn't have to be) and write code that takes no input and outputs code CA, again following all usual rules. (Note: this can be obfuscated code and doesn't necessarily need to be golfed, but the longer this code is the easier it will be for the robbers to crack your submission.)
Call this language LB and code CB.
For example, Python and Python_code.

The Cop's submission to this challenge is the sequence (specified whether 0- or 1-indexed), the name of the two languages LA and LB (and which one solves which part), and the byte-count of CB only. Keep the actual code of both parts, and the length of CA, secret.

The Robber's challenge is to select a Cops' entry and write code CC in the same LB language that outputs some code in the same LA language that solves the original OEIS task. The length of CC can be no longer than the length of CB as revealed by the cop (though may be shorter). Note: The code produced by CC does not have to match CA.

For our example, this means that the Robber has to write Python code that outputs Jelly code that solves the original OEIS sequence, and that Python code has to be no longer than the length revealed by the Cop.

Winning conditions

The Robber with the most cracked solutions wins.


Brain-Flak, 90 bytes by Mr. Xcoder


Try it online!

This outputs:


First 05AB1E answer!

How does it work?

Let's say we have 24 as input.

Ñ       # Divisors. 
        # Stack: [1, 2, 3, 4, 6, 8, 12, 24]
 É      # Odd?
        # Stack: [1, 0, 1, 0, 0, 0, 0, 0]
  ·     # Double
        # Stack: [2, 0, 2, 0, 0, 0, 0, 0]
   <    # Decrement
        # Stack: [1, -1, 1, -1, -1, -1, -1, -1]
    O   # Sum
        # Stack: -4

The brain-flak code mostly just uses tricks to push large numbers in few bytes. It was very convenient (and unintentional) that the ASCII values are mostly increasing:


It's also nice that 60 * 3 ~=~ 183 so tripling it and adding a few can save a ton of bytes.


    # Push 79
    # Minus 19 (60)

    # Push that two extra times

    # Push that ^ (60) Plus the two extras popped (60 + 120 == 180)...
    # + 3 (183)

    # Plus stack-height * 3 * 2 == 3 * 3 * 2 == 18 (201)

    # Plus stack-height * 2 == 4 * 2 == 8 (209)

Jelly, 34 bytes by Arnauld

Managed a byte shorter than his solution!


Try it online!

This outputs the JS function


which computes A000041 (0-indexed; nn(0) returns true in place of 1).


TeX by Simon Klaver


prints g, which computes the length of the input in 05AB1E.


Malbolge, 32 bytes by Lynn


Try it online!

That prints the following haskell function:

gcd 2

Try it online!

I used this online tool to generate the Malbolge

  • \$\begingroup\$ I used the same tool :) I was hoping not many people know about it. \$\endgroup\$ – Lynn Jun 17 '18 at 17:59

Python, 13 bytes by HyperNeutrino


Try it online!


Triangularity by Mr. Xcoder, 36 bytes

... ...
..  "..

Try it online!

Prints Jelly code:


Try the Jelly code online! It's quite slow.

  • \$\begingroup\$ Most definitely not what I was thinking of but congrats! I'll include the intended solution in my answer shortly. \$\endgroup\$ – Mr. Xcoder Jun 17 '18 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.