38
\$\begingroup\$

This is the cops' thread. The robbers' thread goes here.

The last thread was already 4 months ago.

The cop's task

  • The cop's task is to write a program/function that takes a positive (or non-negative) integer and outputs/returns another integer.
  • The cop must state it if the program is intolerant towards zero.
  • The cop will provide at least 2 sample inputs/outputs.
  • For example, if I have decided to write the Fibonacci sequence, I would write this in my answer:
a(0) returns 0
a(3) returns 2
  • The number of examples is up to the cop's discretion.
  • However, the sequence must actually exist in the On-Line Encyclopedia of Integer Sequences®, so no pseudo-random number generator for you. :(
  • The cop can hide as many characters as is so wished.
  • For example, if my program is:

function a(n)
    if n>2 then
        return n
    else
        return a(n-1) + a(n-2)
    end
end

  • Then I would hide these characters as I want:

function a(n)
    if ### then
        ########
    else
        ######################
    end
end

The robber's task

  • is obviously to find the original source code.
  • However, any proposed source code that produces the same set of output also counts as valid, as long as it is also found in OEIS.

Tips for the cops

  • The search function in the OEIS only works for consecutive terms, so if you want to hide your sequence, then just leave a hole anywhere.
  • Apparently there is no way to hide the sequence. Put this in mind when you choose the sequence.

Your score is the number of bytes in your code.

The winner will be the submission with the lowest score that hasn't been cracked in 7 days.

Only submissions that are posted in 2016 April are eligible for the win. Submissions that are posted later than this are welcome, but cannot win.

In order to claim the win you need to reveal the full code and the OEIS sequence (after 7 days).

Your post should be formatted like this (NN is the number of characters):


Lua, 98 bytes

Output:

a(0) returns 0
a(3) returns 2

Code (# marks unrevealed characters):

function a(n)
    if ### then
        ########
    else
        ######################
    end
end

If the code is cracked, insert [Cracked](link to cracker) in the header. If the submission is safe, insert "Safe" in the header and reveal the full code in your answer. Only answers that have revealed the full code will be eligible for the win.

\$\endgroup\$
21
  • 2
    \$\begingroup\$ Also, OEIS search can have blanks with _, fyi \$\endgroup\$
    – Sp3000
    Apr 9, 2016 at 0:59
  • 9
    \$\begingroup\$ It may be too late to change, but allowing sequences that are multiples of an OEIS sequence, and/or only include every nth term would have made this challenge much better. sandbox, hint, hint \$\endgroup\$ Apr 9, 2016 at 2:37
  • 6
    \$\begingroup\$ Can I, for example, pick the Fibonacci sequence and provide only a(1000)? (which is part of the sequence, but too large to be searchable on OEIS) \$\endgroup\$
    – Sp3000
    Apr 9, 2016 at 6:36
  • 2
    \$\begingroup\$ I'd say the values have to actually be searchable on OEIS, so that it can easily be verified that the values are correct for the chosen sequence. \$\endgroup\$
    – user45941
    Apr 9, 2016 at 6:38
  • 3
    \$\begingroup\$ "Intolerant towards zero" makes no sense. What is that supposed to mean? \$\endgroup\$
    – feersum
    Apr 10, 2016 at 23:28

75 Answers 75

2
\$\begingroup\$

Reng v.3.3, 36 bytes. Cracked, A005449

Output:

a(1) = 2
a(3) = 15

# denotes a gone character. There are no other #s in the program.

i#:#+##-##)####¡#~
##########!</div>

Alright this is the last one for a while. Other people need to answer >_>. A description of each character can be found in the source code, where all the ops are defined. A comment proceeds each operator.

Original code:

i>:1+(1-?v)v/a+¡n~
~^<$:$:$:>!</div>
\$\endgroup\$
4
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – Leaky Nun
    Apr 9, 2016 at 5:52
  • \$\begingroup\$ What is the original sequence? \$\endgroup\$
    – Leaky Nun
    Apr 10, 2016 at 0:06
  • \$\begingroup\$ +1 for </div>, an HTML tag that strangely appeared in this code. I like finding out secrets like this. :-P \$\endgroup\$
    – user48538
    Apr 17, 2016 at 13:17
  • \$\begingroup\$ @zyabin101 XD Thanks! I put it there as a red herring. \$\endgroup\$ Apr 17, 2016 at 18:36
2
\$\begingroup\$

J, 8 bytes, cracked

# marks unrevealed characters

(##-#)#.

(Online interpreter here.)

Output:

No, I'm not hiding anything by using a long sample. If the input is 0, it outputs 0, if the input is between 1 and 29, it outputs 1.

The outputs for the negative inputs do not match with the actual sequence.

   (##-#)#.0
0
   (##-#)#.1
1
   (##-#)#.2
1
   (##-#)#.3
1
   (##-#)#.4
1
   (##-#)#.5
1
   (##-#)#.6
1
   (##-#)#.7
1
   (##-#)#.8
1
   (##-#)#.9
1
   (##-#)#.10
1
   (##-#)#.11
1
   (##-#)#.12
1
   (##-#)#.13
1
   (##-#)#.14
1
   (##-#)#.15
1
   (##-#)#.16
1
   (##-#)#.17
1
   (##-#)#.18
1
   (##-#)#.19
1
   (##-#)#.20
1
   (##-#)#.21
1
   (##-#)#.22
1
   (##-#)#.23
1
   (##-#)#.24
1
   (##-#)#.25
1
   (##-#)#.26
1
   (##-#)#.27
1
   (##-#)#.28
1
   (##-#)#.29
1
\$\endgroup\$
1
2
\$\begingroup\$

JavaScript ES6, 119 bytes, Cracked.

Output:

a(0) = 0
a(5) = 10000

Code:

x=>##=#=>[[[##x####r(###f#n###;#####n####h.##w###<1##].c####t.##pl##[####nc#######y([###(###(#]###)######`#######h####`

Returns an anonymous function.

Original sequence: A016744.

Original code:

x=>{f=n=>[[[1,x] for(x of n)]];return Math.pow(x<<1,[].concat.apply([].concat.apply([],f(f(f([]))))).join``.length)}//`

I need to show more characters of obsfucated code next time :P

\$\endgroup\$
1
  • \$\begingroup\$ Cracked. I wasn't sure which sequence you were going for though, so I had to just choose the easiest one then ignore the rest of the characters. :( \$\endgroup\$
    – user81655
    Apr 10, 2016 at 6:52
2
\$\begingroup\$

05AB1E, 5 bytes, cracked

##s##

# indicates a hidden character.

Output:

a(4) = 8
a(6) = 144

The sequence starts at a(1).


The original code was exactly as in @Adnan's answer to robbers' thread.

\$\endgroup\$
10
  • 2
    \$\begingroup\$ My first 05AB1E submission! \$\endgroup\$
    – Luis Mendo
    Apr 10, 2016 at 3:26
  • 1
    \$\begingroup\$ Wow! I'm glad to see this :) \$\endgroup\$
    – Adnan
    Apr 10, 2016 at 8:22
  • 1
    \$\begingroup\$ Cracked. \$\endgroup\$
    – Adnan
    Apr 10, 2016 at 8:48
  • \$\begingroup\$ @Adnan I thought it would last longer :-) Can sequences in OEIS be searched for specific terms? \$\endgroup\$
    – Luis Mendo
    Apr 10, 2016 at 11:38
  • 1
    \$\begingroup\$ @Adnan I think you could avoid copyright law infringement by first making a first search on oeis (preformated), and then let the script choose which one respects the indexes \$\endgroup\$
    – THC
    Apr 11, 2016 at 12:18
2
\$\begingroup\$

Jolf, 13 bytes, safe!

Outputs:

a(5) = 40
a(8) = 128

Code:

#+~##~####xx#

Interpreter.

Revealed:

OEIS A003600

γ+~iu~iZCzxxγ
γ γ =
zx range 1..x (input)
ZC cumulutive sum
~i identity
u sum of
~i identity
+ x plus x
γ out γ

\$\endgroup\$
6
  • \$\begingroup\$ Ooh, Jolf. I'm gonna have a crack at this one. Please don't steal it, Kenny. \$\endgroup\$
    – anon
    Apr 10, 2016 at 4:04
  • \$\begingroup\$ @QPaysTaxes Any luck? :3 \$\endgroup\$ Apr 10, 2016 at 15:37
  • \$\begingroup\$ I might've had some of you didn't have undocumented functions everywhere :P. As it is, I've got two candidates for the sequence, and some idea of how to make them, but it's a pain in the butt :P \$\endgroup\$
    – anon
    Apr 10, 2016 at 16:36
  • \$\begingroup\$ @QPaysTaxes I don't think this code uses any undocumented features. \$\endgroup\$ Apr 10, 2016 at 16:37
  • \$\begingroup\$ But they still make reading the source hard. Anyway, I'm just complaining. Feel free to ignore me. \$\endgroup\$
    – anon
    Apr 10, 2016 at 16:38
2
\$\begingroup\$

Jolf, 16 bytes, safe!

Outputs:

a(0) = 0
a(4) = -2
a(51) = 26

Code:

#.‘###4#x##32#mA

Revealed:

Sequence: A001057, the canonical enumeration of integers.
*.‘01m4zx’m32xmA
‘ ’ an array
0 0: 0
1 1: 1
m4zx antisum of range 1..x (1 - 2 - 3 - 4 - ... - x)
. m32x get min(2, x) of that array
* mA multiply that entry by the sign of x (implicit input); is zero when zero

\$\endgroup\$
2
\$\begingroup\$

05AB1E, 28 bytes (Cracked)

#D>D>D>D>*##*#D<*#+*#n#n#**#

a(1) = 1

a(2) = 8

a(3) = 42

Behaviour for zero is unspecified.

Cracked:

 DD>D>D>D>****rD<*6+*6n2n5**/

There is no need for an explanation I think as the crack was almost 100% spot on. The only difference is I used r to reverse stack instead of swapping top two elements.

\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$
    – Emigna
    Apr 14, 2016 at 12:38
2
\$\begingroup\$

05AB1E, 10 bytes, Cracked

##3##1+*1+

0-indexed.

0 ==> 1
4 ==> 61
5 ==> 91
9 ==> 271

Original Program:

UX3*X1+*1+

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Cracked \$\endgroup\$
    – Emigna
    May 15, 2016 at 8:41
2
\$\begingroup\$

S.I.L.O.S, 37 bytes (Cracked.)

Code:

readIO
#=#
#+#
#*#
#*#
#+#
printInt i

#s are the hidden characters.

Output:

a(0) = 1
a(4) = 41
a(9) = 181
\$\endgroup\$
1
  • 1
    \$\begingroup\$ Cracked \$\endgroup\$
    – Emigna
    Oct 20, 2016 at 9:18
1
\$\begingroup\$

J, 7 bytes, cracked

Output:

a(0) = 6
a(2) = 27

Code (I have shown more for added difficulty):

#+#:###

Is a tacit verb.

\$\endgroup\$
1
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – Dennis
    Apr 9, 2016 at 2:57
1
\$\begingroup\$

Python 2, 87 bytes, cracked

n=input()
#####################################################################
print _

Output:

a(5) = 2
a(10) = 2
a(15) = 1
a(20) = 1
a(25) = 1

I really should have checked for other sequences before I posted, here's another one that works (A014709):

n=input()
g=lambda n:~n%2*(n/2%2+1)or g(n/2);_=g(n)############################
print _
\$\endgroup\$
1
1
\$\begingroup\$

Jolf, 3 bytes Cracked, A001477

___

Examples:

0 -> 0

1 -> 1

4 -> 4

9 -> 9

Original Code:

 "%"
\$\endgroup\$
1
1
\$\begingroup\$

PHP, 18 bytes, cracked

Here's a very short one, at least in terms of PHP. I wonder if it survives this Sunday the next thirty minutes.

Output

a(0) = -1
a(1) =  0

Source

____$____[1]+_+_0;
#### ####    # #

Notes


Cracked

The sequence was A023443:

a(n) = n - 1

Here's my original source code, which is slightly different to the robber's:

echo$argv[1]+-+!0;

\$\endgroup\$
1
1
\$\begingroup\$

J, 8 bytes (Cracked)

# marks unrevealed characters

(#1-#)#.

The output:

No, I'm not hiding anything by using a long sample. If the input is 0, it outputs 0, if the input is between 1 and 29, it outputs 1.

The outputs for the negative inputs do not match with the actual sequence.

   (#1-#)#.0
0
   (#1-#)#.1
1
   (#1-#)#.2
1
   (#1-#)#.3
1
   (#1-#)#.4
1
   (#1-#)#.5
1
   (#1-#)#.6
1
   (#1-#)#.7
1
   (#1-#)#.8
1
   (#1-#)#.9
1
   (#1-#)#.10
1
   (#1-#)#.11
1
   (#1-#)#.12
1
   (#1-#)#.13
1
   (#1-#)#.14
1
   (#1-#)#.15
1
   (#1-#)#.16
1
   (#1-#)#.17
1
   (#1-#)#.18
1
   (#1-#)#.19
1
   (#1-#)#.20
1
   (#1-#)#.21
1
   (#1-#)#.22
1
   (#1-#)#.23
1
   (#1-#)#.24
1
   (#1-#)#.25
1
   (#1-#)#.26
1
   (#1-#)#.27
1
   (#1-#)#.28
1
   (#1-#)#.29
1
\$\endgroup\$
3
  • \$\begingroup\$ Are you sure it's a function, so ((#1-#)#.)1 also works? \$\endgroup\$
    – jimmy23013
    Apr 10, 2016 at 9:58
  • \$\begingroup\$ ((#1-#)#.)1 works. \$\endgroup\$
    – Leaky Nun
    Apr 10, 2016 at 10:09
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – Zgarb
    Apr 10, 2016 at 20:39
1
\$\begingroup\$

PHP, 137 bytes, cracked

This is my final sequence. You should be feeling lucky when trying this one.

Output

a(3)  =   7
a(7)  =  21
a(23) =  99

Source

for(___range___303_______________________array_merge____)for(__________________________________________)unset________;echo___$argv[1]-1_;
    ###     ###   #######################           ####     ##########################################      ########     ###          #

Notes

  • This sequence starts at 1.
  • The program works up to the last number given bei OEIS, but can easily be adjusted to go to any other value as well.
  • It's a full program, not a function.
  • Reads the input from command line (obviously).
  • Does not contain any PHP opening tag.

Cracked

The wording "feeling lucky" and the value 303 in the source were hints to the sequence A000959:

Lucky numbers

This is my original source, which is slightly different to the robber's:

for($n=range(1,303);$j<count($n);++$j,$n=array_merge($n))for($i=($x=$j?$n[$j]:2)-1;isset($n[$i]);$i+=$x)unset($n[$i]);echo$n[$argv[1]-1];

\$\endgroup\$
1
1
\$\begingroup\$

Ruby, 11 bytes, cracked

Code:

->i{######}

Output:

f(0) = 0
f(1) = 0
f(2) = 0
f(3) = 1
f(4) = 0
f(5) = 0
f(6) = 0
f(7) = 1
f(8) = 0
f(9) = 0
f(10) = 0
f(11) = 1
f(12) = 0
f(13) = 0
f(14) = 0
f(15) = 1

And so on, forming A011765. Curious to see if there's more than one way to do this in 6 bytes.

\$\endgroup\$
4
  • \$\begingroup\$ Cracked? \$\endgroup\$ Apr 11, 2016 at 20:13
  • \$\begingroup\$ What was the intended solution then? :) \$\endgroup\$ Apr 11, 2016 at 20:27
  • \$\begingroup\$ Was being cagey since there might be a way to salvage the trick, but I've added it to the solution thread. \$\endgroup\$
    – histocrat
    Apr 11, 2016 at 20:29
  • \$\begingroup\$ Here it is in 6 bytes in bc: !++x%4 \$\endgroup\$
    – user53101
    Apr 18, 2016 at 1:53
1
\$\begingroup\$

Python, 123 bytes, Cracked

Probably not winning any prizes, but fun nonetheless.

# marks a hidden character, it is not used anywhere in the code.

def #(#):
 if n<2:
  return n
 else:
  return #(n-1)+#(n-2)

def g(n):
 ######:
  return n
 else:
  return (#(n##)+#(##2))###

Sample cases:

g(1) -> 1
g(6) -> 8
g(10) -> 7

My sequence was A089911, Fibonacci Numbers mod 12.

Original code:

def f(n):
 if n<2:
  return n
 else:
  return f(n-1)+f(n-2)

def g(n):
 if n<2:
  return n
 else:
  return (f(n-1)+f(n-2))%12
\$\endgroup\$
1
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – Adnan
    Apr 12, 2016 at 12:02
1
\$\begingroup\$

Haskell, 51 bytes (Cracked)

Outputs:

f 0 -> 0
f 1 -> 1
f 2 -> 1
f 3 -> 0
f 4 -> 0
f 5 -> 3
f 6 -> 5

Code:

f e=sum[#########$#####(f######=#####e####)#######]

This defines a function named f, with # as the wildcard character. Shouldn't bee too hard to crack.

\$\endgroup\$
2
  • \$\begingroup\$ my guess \$\endgroup\$
    – nimi
    Apr 11, 2016 at 23:37
  • \$\begingroup\$ @nimi That is exactly identical to my reference answer. I'll edit it here later. \$\endgroup\$
    – Zgarb
    Apr 13, 2016 at 2:03
1
\$\begingroup\$

Javascript, 30 bytes, Cracked

# marks unrevealed characters.

n=>M###.##w(n#!#[#+!#[#)-(n##)

Examples:

0 -> 1
1 -> 1
7 -> 43
18 -> 307

Original Code:

n=>Math.pow(n,!+[]+!+[])-(n-1)
\$\endgroup\$
1
1
\$\begingroup\$

R 64 bytes

Code

##########################
a=function(x)sum(x*3,1,a(x-2):a(x-1))

Output

a(1) =1
a(2) =1
a(3) =2
a(4) =3
a(5) =5
a(6) =8
a(7) =13
a(8) =21
a(9) =34
a(10)=55
a(11)=89
a(12)=144
a(13)=233
a(14)=377
a(15)=610
a(16)=987
a(17)=1597
a(18)=2584
a(19)=4181
a(20)=6765

Simply, Fibonnaci sequence.

Hope it's fun enough.

\$\endgroup\$
1
\$\begingroup\$

Jolf, 3 bytes, cracked

Output:

a(0)  =      0
a(4)  =    260
a(10) =  10010
a(23) = 279864

Code:

###

All these features are documented. Yeah, you don't get any parts of the code :P The sequence is off-by-one.

Original:

+ΤQ
\$\endgroup\$
3
  • \$\begingroup\$ Cracked. \$\endgroup\$ Apr 17, 2016 at 20:46
  • \$\begingroup\$ Ah, I thought you might be using T because you added it to the docs just before you posted the answer, but I didn't consider combining it with Q. \$\endgroup\$ Apr 17, 2016 at 21:09
  • \$\begingroup\$ @MartinBüttner Was it that obvious? XD Nice job, anyhow! Thanks for using Jolf! :D \$\endgroup\$ Apr 17, 2016 at 21:10
1
\$\begingroup\$

MATL, 10 bytes, safe!

2*##n##qn-

Starts at 1, # are hidden characters. Sample input/output:

a(3)=1
a(8)=2

Revealed

The sequence is the number of primes between n and 2*n. The code used was 2*ZqnGZqn-. This takes implicit input, doubles it, and finds the number of primes less than that number, pushes the input again and finds the number of primes less than that, and then subtracts the two lengths from each other.

\$\endgroup\$
2
  • \$\begingroup\$ I was close with 2*_VnGYqn- (number of decimal figures in 2*input). But that doesn't seem to be an OEIS sequence \$\endgroup\$
    – Luis Mendo
    Apr 17, 2016 at 23:36
  • \$\begingroup\$ I'm really surprised you haven't got it! I wan't thinking of anything like that sequence though. The G is correct though..... \$\endgroup\$
    – David
    Apr 17, 2016 at 23:40
1
\$\begingroup\$

C++, 55 bytes (Safe)

This one should be easy...

source:

bool f(int###########;##r#;r###&1#####+######r######r;}

Output:

f(1)=>0
f(2)=>1
f(3)=>1
f(4)=>0
f(5)=>1
f(6)=>0
f(7)=>1
f(8)=>0
f(9)=>0
f(10)=>0
f(11)=>1

answer

Sequence:

A010051 (Characteristic function of primes: 1 if n is prime else 0.)

code:

bool f(int r){int i=2;for(;r%i&&1-r;i++);return i ==r;}

\$\endgroup\$
3
  • \$\begingroup\$ I am curious, what is the solution? \$\endgroup\$
    – mIllIbyte
    Apr 20, 2016 at 7:52
  • \$\begingroup\$ @mIllIbyte my solution is posted \$\endgroup\$
    – MegaTom
    Apr 20, 2016 at 13:51
  • \$\begingroup\$ No obscure language features at all, it's just optimized. Neat! \$\endgroup\$
    – mIllIbyte
    Apr 21, 2016 at 15:15
1
\$\begingroup\$

05AB1E, 4 bytes, cracked

Outputs:

a(0) = 1
a(2) = 4
a(10) = 4444

Code:

____

_ indicates an obfuscated character. Try it online!.

\$\endgroup\$
4
  • \$\begingroup\$ Easy to find. Easy to implement. Hard to optimize to 4 bytes (stuck at 6 atm). Nice challenge! \$\endgroup\$
    – Emigna
    Apr 20, 2016 at 11:34
  • \$\begingroup\$ @Emigna Yeah, that's probably going to be the hardest part. I think I know what your current 6 byte solution is, so my tip is that there are 1 byte commands which can replace 2-byte combinations in your code (and there are two of them). Good luck though :) \$\endgroup\$
    – Adnan
    Apr 20, 2016 at 20:22
  • \$\begingroup\$ Cracked I never understood was  did when I read the spec. Should have just looked at the code. Pretty sure I tried F earlier, but I must have done something wrong. My favorite cop this far :) \$\endgroup\$
    – Emigna
    Apr 21, 2016 at 9:03
  • \$\begingroup\$ @Emigna Yeah, I might have to make the docs a bit more specific. Great job in cracking though :). \$\endgroup\$
    – Adnan
    Apr 21, 2016 at 19:02
1
\$\begingroup\$

Seriously, 16 bytes (safe)

???"Xi"?≈$?,?R??

Examples:

a(3) = 1
a(40) = 4

This sequence starts at a(1).


Sequence:

http://oeis.org/A001222 (prime divisors of n with multiplicity)

Code:

ΣM£"Xi"w≈$X,QR£ƒ

Explanation:

The neat thing about this code (and the reason why it's difficult to crack) is that the actual divisor-counting part is reversed. Going through the code, everything up until the , doesn't actually do anything when executed left-to-right (except for pushing "Xi" and then subsequently popping it). ,QR£ƒ reads in the input (n) and executes the code reversed (Q pushes the source code, R reverses it, and £ƒ calls it). Now, the stack contains n and the code is ƒ£RQ,X$≈w"iX"£MΣ. The first 3 commands (ƒ£R) do nothing with an integer on the stack. Q pushes the source code (again), , does nothing because the input is exhausted, and X gets rid of the Q result. $≈ converts the input to a string and back to an int (necessary in the reversed code to prevent unwanted stack items). w pushes a list of [prime, exponent] pairs for all the prime factors of n, and iX"£MΣ sums up all of the exponents.

\$\endgroup\$
1
\$\begingroup\$

Seriously, 14 bytes (Safe)

,???D*≈@??D*≈-

The ?s denote the hidden code. This sequence starts at a(0).

Output:

a(0) = 1
a(1) = 0
a(3) = 1

Solution:

The sequence is:

A005614 (the infinite Fibonacci word)

My solution:

,;uφD*≈@⌐φD*≈-

The solution is a straightforward implementation of the formula found on the OEIS page (with an error corrected so that the sequence starts at n=0 like the page shows, rather than n=1).

\$\endgroup\$
4
  • \$\begingroup\$ I'm assuming your sequence starts at 0. \$\endgroup\$
    – anon
    Apr 11, 2016 at 4:38
  • \$\begingroup\$ @QPaysTaxes Given that the first sample output is a(0), that's a safe assumption :) \$\endgroup\$
    – user45941
    Apr 11, 2016 at 4:43
  • \$\begingroup\$ No, I mean that either a(-1) is undefined or not listed on OEIS. \$\endgroup\$
    – anon
    Apr 11, 2016 at 4:44
  • \$\begingroup\$ @QPaysTaxes You are correct. \$\endgroup\$
    – user45941
    Apr 11, 2016 at 4:50
1
\$\begingroup\$

05AB1E, 3 bytes, Cracked

Output:

a(4) = 4
a(6) = 7

Code:

___

_ (underscore) indicates an obfuscated character

Try it online

\$\endgroup\$
3
  • \$\begingroup\$ Cracked :) \$\endgroup\$
    – Adnan
    Apr 25, 2016 at 18:06
  • \$\begingroup\$ @Adnan: Oh come on! Not even 1h :) \$\endgroup\$
    – Emigna
    Apr 25, 2016 at 18:12
  • \$\begingroup\$ Hahaha, sorry. I always get excited when I see someone else post in 05AB1E :). \$\endgroup\$
    – Adnan
    Apr 25, 2016 at 18:16
1
\$\begingroup\$

LiveCode, 35 bytes, cracked

_un_t_on oeis _
    ___u___n__
En__oeis

oeis (2)==2

oeis (0)==0

\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$
    – Emigna
    Apr 27, 2016 at 6:24
1
\$\begingroup\$

Python, 37 bytes, cracked

def a(n):
    return ______!______n____*_

a(2)==4 a(4)==16

\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$
    – Emigna
    Apr 27, 2016 at 7:13
1
\$\begingroup\$

05AB1E, 8 bytes, Cracked

Output:

a(3) = 2
a(4) = 7

Code:

___s_r__

_ (underscore) indicates an obfuscated character

Try it online

Original Code:

ÑDgs`rG^

Which is the sequence A178910 (Binary XOR of divisors of n.)

\$\endgroup\$
1
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – Adnan
    Apr 28, 2016 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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