Restricted mini challenges Cop's Thread

33

3

Robber's thread

Your task as cops is to select three things:

  • A programming language

  • An OEIS sequence

  • A byte set

You are then to secretly write a program in that language that computes the nth term sequence using only the bytes in the set. You will reveal the three pieces of information so that robbers can try to figure out the program.

Answers will be scored by the number of bytes in the byte set with more score being good. Cracked answers have an automatic score of 0. If your answer is uncracked after one week you may reveal the intended program and mark your answer as "safe".

Answers must be capable of calculating every term in the b-files of the sequence, but are not required to calculate any terms after.

Sequences can be either 1 or 0 indexed for both cops and robbers.

Here is a Python Script that checks if your code matches the given byte set.

Post Rock Garf Hunter

Posted 2017-07-27T16:42:10.187

Reputation: 55 382

1Lower score is better? Or higher? So in essence we're trying to find a restricted character set that makes it difficult for someone else to make a program in the chosen language, after we've already worked out a solution? – BradC – 2017-07-27T16:56:15.893

1Do we need to use all the bytes in our set? I would guess yes but it should probably be specified in the challenge. – Shaggy – 2017-07-27T17:06:35.260

1@Shaggy generally no, you can includes others for red herrings, but robbers can use everything – Stephen – 2017-07-27T17:08:31.977

Do we count newlines as a separate byte or as \n? – JAD – 2017-07-27T17:13:41.760

@StepHen does that mean that you can include bytes that aren't even part of your language to get a higher score? – H.PWiz – 2017-07-27T17:16:36.993

@H.PWiz you'd have to ask WheatWizard about no-ops – Stephen – 2017-07-27T17:17:20.600

1Can robbers use the same byte twice or more? – Mr. Xcoder – 2017-07-27T17:19:08.043

1@mrxcoder I would think so, else we are just finding anagrams. – JAD – 2017-07-27T17:24:27.300

@Mr.Xcoder You are then to secretly write a program in that language that computes the nth term sequence using only the bytes in the set. only the bytes in that set, so dupes are allowed – Stephen – 2017-07-27T17:50:59.423

Do I understand right that the robber could (if characters allow) hardcode an enormous table of values corresponding to the b file? This could be hard for cops to avoid. – xnor – 2017-07-27T18:52:54.200

@xnor Yes that would be possible. The problem is OEIS sequence do not have rigorous specifications, so we can only confirm via test battery. – Post Rock Garf Hunter – 2017-07-27T19:51:34.387

1

What do you mean by "b-list"? Is that the list of terms shown on the page that has the "list", i.e. http://oeis.org/A000004/list ?

– Azulflame – 2017-07-27T23:21:20.470

2

@Azulflame The b-files are files that are associated with each sequence the can be accessed by replacing the A with a b and appending a .txt. For example https://oeis.org/b4.txt would access the b-files for that sequence.

– Post Rock Garf Hunter – 2017-07-27T23:47:00.373

Can the byteset contain non-printable-ASCII? (i.e. can I inflate my score by including 0x00-0x1f and 0x7f-0xff?) – Doorknob – 2017-07-28T03:40:44.823

@Doorknob Yes it can, the question is about chiefly about bytes and is agnostic to characters. – Post Rock Garf Hunter – 2017-07-28T03:50:42.830

Answers

11

Haskell, A209229, (cracked)

11 characters (including newline):

s<=[ ]
how!

Outputs True/False as an indicator function for powers of 2:

1 => True
2 => True
3 => False
4 => True
5 => False
6 => False
7 => False
8 => True
9 => False
...

Inputs are positive integers.

xnor

Posted 2017-07-27T16:42:10.187

Reputation: 115 687

Does 0 give False? – H.PWiz – 2017-07-27T21:33:56.993

@H.PWiz My code doesn't work for 0, your crack can do whatever you want for it. – xnor – 2017-07-27T21:35:14.203

Cracked! Very clever~ – Lynn – 2017-07-27T22:00:26.590

@Lynn Nicely done! – xnor – 2017-07-27T22:16:29.077

5

Python 2, A000045 (Cracked)

ml:= input(as,forge)

it contains a whitespace and a newline
Try it Online!
Intended solution

Rod

Posted 2017-07-27T16:42:10.187

Reputation: 17 588

1+1 I am surprised this doesn't use + at all – Mr. Xcoder – 2017-07-27T17:49:26.093

2Congrats on 10k btw :) – Adnan – 2017-07-27T17:55:33.323

Cracked – Adnan – 2017-07-27T18:05:15.487

@Mr.Xcoder Don't know python that well, but would plus work? – JAD – 2017-07-27T18:10:36.050

@JarkoDubbeldam No, sum would – Mr. Xcoder – 2017-07-27T18:11:09.467

@Mr.Xcoder yep, saw that just now... Derp :) – JAD – 2017-07-27T18:11:27.743

5

Haskell, A000045 (cracked)

I made up my mind, I think I like t more than s.

So let's use these 30 bytes (including newline) instead:

abcdeFgh|jklmnopqrtTuvwxyz
=()

Please note that the general challenge description demands that

Answers must be capable of calculating every term in the b-files of the sequence [...].

In this case, the b-file goes up to the 2000th number, which is way beyond what can be computed using Int.

Christian Sievers

Posted 2017-07-27T16:42:10.187

Reputation: 6 366

Cracked! – Lynn – 2017-07-28T13:28:35.383

Cracked – H.PWiz – 2017-07-28T15:15:35.917

4

Octave, A000290, Cracked!

The sequence is the square numbers: 0, 1, 4, 9, 16, 25, 36, 49 ... (so that you don't have to check the link).

'()/@^_

Stewie Griffin

Posted 2017-07-27T16:42:10.187

Reputation: 43 471

Cracked! – Conor O'Brien – 2017-07-27T19:14:25.830

That was indeed the intended solution :) – Stewie Griffin – 2017-07-27T22:08:24.743

4

Haskell, A000045 (Cracked)

Everyone likes Fibonacci numbers, I like Haskell...

I have carefully selected 30 bytes for you: the lowercase letters except f, i and t, you get the uppercase letters F and T and the pipe symbol | instead, and the three symbols =(), and newline. Here they are again:

abcdeFgh|jklmnopqrsTuvwxyz
=()

Christian Sievers

Posted 2017-07-27T16:42:10.187

Reputation: 6 366

Cracked – xnor – 2017-07-27T22:17:57.967

4

Haskell, A034262, 43 bytes, cracked

!"#%',.=?ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_{|}~

Computes a(n) = n³ + n.

Laikoni

Posted 2017-07-27T16:42:10.187

Reputation: 23 676

Can't get the b-file now. Is returning an Int good enough? – Christian Sievers – 2017-07-28T09:28:17.113

1Cracked? – Christian Sievers – 2017-07-28T09:42:44.600

@ChristianSievers Yes, that's exactly my solution. – Laikoni – 2017-07-28T10:21:07.980

4

Haskell, A009056 (cracked)

Another simple one, now again with enough letters to make it look like ordinary Haskell and maybe for you to amaze me by finding a solution completely different from mine.

The sequence is Numbers >=3 and the charset consists of these 30 bytes:

{[abcdefghijklmnopqr uvwxyz]}.

The crack has some nice techniques. I was just thinking of this:

head . flip drop [ floor pi .. ]

Christian Sievers

Posted 2017-07-27T16:42:10.187

Reputation: 6 366

1Cracked. – nimi – 2017-08-05T19:24:54.627

3

C (C99), A000005, 25 Bytes#, Cracked!

These are the bytes for a full problem, takes n as a command line argument and outputs answer to stdout.(Space is included in bytecount).

<=>,;!"()*%+acdfhimnoprt 

dj0wns

Posted 2017-07-27T16:42:10.187

Reputation: 328

ok I was wondering lol. as a command line argument? – Conor O'Brien – 2017-07-27T19:25:57.133

Yes, I'll make that clearer – dj0wns – 2017-07-27T19:27:21.837

1Cracked! this was fun :D – Conor O'Brien – 2017-07-27T19:40:10.017

3

Unary, A002275, 1 Byte

Byte set:

0

I had to at least try it :3

(I don't think it will be particularly hard seeing as every command in the language is available)

sonar235

Posted 2017-07-27T16:42:10.187

Reputation: 111

1Why not include all of the bytes to maximize your score? You have scored the lowest amount possible, when it would make no difference to include all of the bytes. – Post Rock Garf Hunter – 2017-07-27T19:52:27.627

I thought we were going for a low score (sorry, I'm new here). – sonar235 – 2017-07-27T19:59:56.090

1Cracked – Blue – 2017-07-27T20:04:10.177

@muddyfish Is input as a character allowed for brainfuck? – sonar235 – 2017-07-27T20:06:37.783

@sonar235 In general we do allow input as character for brainfuck. Although since values here exceed 255, I don't think an answer that uses them can be valid. – Post Rock Garf Hunter – 2017-07-27T20:07:43.753

@muddyfish Good to know. Would certainly have simplified my solution lol – sonar235 – 2017-07-27T20:08:05.570

muddyfish's solution is still not valid though see my edited comment. – Post Rock Garf Hunter – 2017-07-27T20:11:10.943

@WheatWizard Didn't catch that, thanks. – sonar235 – 2017-07-27T20:22:02.950

3

Cubix, A000027 (SAFE) 17 points

!&')-/0;@Oiru.NSQ

My solution:

!O!;i)!/u&!!r-)0'u;;!@

watch it online here

I originally did this without .NSQ but I figured I could add them safely.

Explanation:

This sequence is just "The Positive Integers". However, Cubix has three input commands, i, which reads in a single char (pushing -1 if input is empty), A, which reads in the rest of the input as chars (pushing a -1 to the bettom of the stack), and I, which reads the next number off the input (pushing 0 if there isn't a match). So naturally, I only provided i which reads in digits as their ascii value. uh-oh. Additionally, -1 is the usual marker for end of input, in conjunction with ? so I got rid of ?, forcing me to use ! (skip next instruction if TOS is not zero) for control flow. Finally, I thought I needed & to concatenate digits for printing with O (which outputs the top of stack as a number), but I realize now that that wasn't necessary either!

Another part of the challenge was originally to not have . the no-op character, but you can use pairs of ! instead if you're careful:

    ! O
    ! ;
i ) ! / u & ! !
r - ) 0 ' u ; ;
    ! @
    . .

i) : read input, increment.

!/ : if top of stack is zero (end of input), turn left

left: ;O.@ : pop top of stack, output as number, halt.

otherwise:

u'0: push char code of 0 to top of stack

)-r: increment, subtract, and rotate

;; : pop top of stack twice

u& : concatenate digits

!! : net zero effect, now we are at i) again.

Giuseppe

Posted 2017-07-27T16:42:10.187

Reputation: 21 077

Cubix has some noop characters right? Why don't you add those to increase your score? Or is part of the challenge that there are no noops. – Post Rock Garf Hunter – 2017-07-27T20:34:32.617

@WheatWizard I decided to be merciful and add . but it can be done without it. – Giuseppe – 2017-07-27T21:23:21.563

3

Hexagony, A057077, 77 bytes

Periodic sequence 1, 1, -1, -1. As a list:

a(0) = 1
a(1) = 1
a(2) = -1
a(3) = -1
a(4) = 1
a(5) = 1
a(6) = -1
   ...

Character set (edited), which includes a newline and a space character:

!%&(),0123456789;?@ABCDEFGHIJKLMOPQRSTUVWXYZ^abcdefghijklmnopqrstuvwxyz[]#. 

Try it online!

Adnan

Posted 2017-07-27T16:42:10.187

Reputation: 41 965

Any reason you modified the character set? – Poke – 2017-07-28T00:49:29.253

1@Poke apparently the higher the byte count the better, so I just added a bunch of non-useful commands. – Adnan – 2017-07-28T00:53:39.977

3

Perl 5, A000030 (Cracked)

Byte set:

imnprt7 $;()<>=~.

Try it online!

theLambGoat

Posted 2017-07-27T16:42:10.187

Reputation: 119

1Cracked! – Dom Hastings – 2017-07-27T20:57:52.470

3

JavaScript (ES6), 17 bytes, A000290 (Cracked)

Again, this is the simple square sequence a(n) = n2.

Byte set:

$()=>CI`abelotv{}

Arnauld

Posted 2017-07-27T16:42:10.187

Reputation: 111 334

Cracked! – LarsW – 2017-07-27T22:33:18.227

3

Seed, A005408 (Odd Numbers) - Safe

Here's a slightly more challenging one. You may use any characters valid in Seed:

[0-9 ]

You shouldn't be able to brute force this one in a week unless you have a monster of a computer. Good luck! It's crackable.

Hint

This is the Befunge-98 program used in my solution: 9&2*1-.@ (the 9 can be removed, but my solution just happens to have

Solution

8 47142938850356537668025719950342285215695875470457212766920093958965599014291682211474803930206233718243166021324700185443274842742744297183042397910454208210130742260519105651032450664856693714718759816232968955289663444878636053035645231246428917992493766505872029989544065894418166685284738859999912471659057565000392419689361271972485444731284404987238803115210428572945108908191097214978382112218242627719651728712577306652405452922782307249485947045215982784790396555726144526602778473387279897334709142853151393812930171163300904436548870603006549005515709074682843356844201220668045057407146751793470423217099467145255174198241606814578351260769359571053755888106818197239116973006365593563235361647743411341624822052103816968153274122434280200888824954875622811325064255818154979564925710534165572852442761249176778416688044630942040966271963723430245979221181930857841829694362184653939393940015797332978459794253176110314873994228261888801228999293570329618551223457182420746927212801550646743152754821640064626761542582557138452651970009253770914346130172884305622027370793496993281847017017643506435562229916984107083951938286577012273222191422054315198157936674247934699496471202544270325061352014830137178245082445717253260177560449757186762445707057028987371278573629077370632470496186218574320801798046510846708620502139560277546345198686675095078255875594169064796673074708822106659920187882062247609587560174781170641367430722951002242213604709887062481149928551745163110045572994991844223216663621203042075294195007458339984527333125093390189721042315604498435269143549420166732177200370228527273606218617171975362431824163269672003982537382982066136613799403024924018145511099557720492305303748099327810811511080314262364010281851651151072957475365629128068033597559560186625877942054704386175359499573139930378099420149452745731809033737756051947913924265484582800618244473333957173960222243311738522875022546610298627492222587971756897328087719407454153248557203886421828643453889090192355970705084245312184441674098515659253482621260617211786550204852895652236768886852209506535523414991099331857674826373947830587028494510697603296607361093480842935154672353288419699354739650168309017848485131553416956405911683526896232046773861961911767319373432460217755874481607587604361758089936007730253450733375831228127106295259261723611771334468553746160739548375950046831923765023329346333968732796413192682936767133122325481273354810124729664400173367781325488656859581438769940474229394692089519981810909719628263357284973442177568041416363386891516725592952892168077523560584005586276794967492051823290615767599202657060820223928678900774601616908031321346819422162123048834532926372862962159255934240435694566497798544870186550219886342379298214007368081326725550763589917206162393892085506551547475259270513853987294911388226039365971184089828739349642347312302559286882065147953715607221387657413593069535573044067517274676745306396611760657091792151803798859781616126637075577936361782593546481811651450365118155866449850474140044293772144065341051900055416408240857348697564252386403719942197789892382627153382011984996644288495699209129097948405810551134169739499539470610790009272281731894550593600643079188663110695127017324336488487580799309995227054576681630676222848231145106058050452439356753552872060820230589152143268436210090733908507724084889788244157692417246691477400856716677564609725979550100138132944851304473466485128295568194188600539248624248078558656162635444219199062786468487219220160009464328883337821175254405764395407405891483810757405446047244460754827113527540703326714751461178900155717130399854358953609995319006890674085682111514072508440632941090209366005504352890092326935445829213294943731517698438648298921337375443947066950275955144209037675013663600062205168551851984361951824731229113379464426979717688372371011461890139087487634586087688796134318950140718824105959727161482389914414206768064990410615468858520426399188835467970981786227122743162945627167772066100574532803061925537235491026486409948728571706557098859331941260622260924660292578136091523126589085799981416326395824628987154802653126685882440760385315869346960183809644486238810912663304360284449610976505715001267334297285036791711464142665122000857666018757370925847113798258537503747803972255591351740843663253694303946089997282812556281486820325652814785261116697261899511762129550421005941055852897451832731304151488058522478260009347144486599715629242208891126238083949281490804191584238425634093683587199278186505945727829025071885767559828670803412582690901456978557379916793144695491189633486065077294485660840922713748873840986104486221528464294334436081663106336911265802650605150347413103936140565054608396116572669757269475369570465915381045895991937087068526458273755454602799814909213983801968791431574508976448235055061998715636460946550584682626461010298101802277643570201189324102499951196290880892383380284543173390448406975616650185808619832614403133944687275834716343817926764699295672501869876060896683204343897481630037607159476461359111190545646447421653872016775582115425356868533678655969328210255235050133718364831289991244684695035034122861927276046255405376531096051541299607470934463981741370397268760811035606321455156217990078359217247117349544774085111287345436916077577032709684005131011429476229617901273007027774182864475737502587896225475248267937497254066190335088823904767397814233350286976811901982274477445433872253983823904938249655089770642137858608313524715533520654523880832056453080193644871440738737277389718589793074725139142291918837706550037934799585495183374639955887618135803388399608755212147742199481865453122900714456703147150994585431640652462593333773031385396586933380738103697887063571042512186708015948688088011290197524699274772775288900864690592106393483764109837848793374117655194139018455509931621247697015323332300969105814058088442693320033876473960017819576425062784644138417943454576404265382986995583045527928832

TehPers

Posted 2017-07-27T16:42:10.187

Reputation: 899

How did you generate this? – Christopher – 2017-08-06T23:58:07.963

@2EZ4RTZ Painfully, and with Python's source as a reference. It can probably be golfed a lot though.

– TehPers – 2017-08-07T04:31:21.907

3

Haskell, A000045 (cracked)

It's cracked, and I won't start a new version, but if you want to play more: it's possible without y, and it's possible to be efficient.


I apologize for leading you in wrong directions by giving a g. Let's do the same without!

Here are the 29 remaining bytes (including newline):

abcdeFh|jklmnopqrtTuvwxyz
=()

Again, remember that Int won't be enough to compute the 2000th Fibonacci number which is needed because it is in the b-file.

Christian Sievers

Posted 2017-07-27T16:42:10.187

Reputation: 6 366

Cracked – nimi – 2017-07-29T13:01:23.370

3

Haskell, A000045 (cracked)

This is kindof (as announced) not a new version, but completely different. (Right?)

I still hope I can make you rediscover my nice little observation.

This time you are asked to implement the Fibonacci sequence using a charset of size 17, which (as far as I know) contains only one two unneeded chars:

eilnt=(,).[ ]_:0!

Note that there is no newline (but feel free to show a version which has them for readability) and remember that you have to be able to compute the 2000th Fibonacci number.

Christian Sievers

Posted 2017-07-27T16:42:10.187

Reputation: 6 366

Cracked. – nimi – 2017-07-30T15:12:11.853

2

Braingolf, A010701 Score: 9 [SAFE]

Byte set:

0x21, 0x24, 0x2F, 0x3A, 0x3F, 0x5B, 0x5D, 0x5F, 0x7C

Try it Online!

The code:

$_/[!?:]|[!?:]|

Try it online!

Explanation

$_/[!?:]|[!?:]|  Implicit input from commandline args
$_               Remove top of stack
  /              Niladic division, push 5
   [...]         While loop, decrements bottom of stack at start of loop
                 then decrements each time loop reaches end
                 Exits when bottom of stack is 0
    !?:.|        If conditional without popping, runs contained code if top of stack is 0
                 This is the sneaky trick here. The conditional skips the end of the loop
                 As a result, this whole block from [ to | effectively acts as a decrement.
         [!?:]|  We do this twice to lower the 5 we pushed down to 3
                 Implicit output of top of stack.

Skidsdev

Posted 2017-07-27T16:42:10.187

Reputation: 9 656

So, I was wondering why nobody had solved this yet, and I realised it relies on an undocumented feature of while loops. Whoops! Try experimenting around a little with while loops and conditionals, and you should find the answer fairly easily ;) – Skidsdev – 2017-07-30T14:58:20.960

This is now safe. – Oliver Ni – 2017-08-06T14:02:36.733

2

cQuents, A000217, Cracked

Byteset:

$:=1;
\-

Note that this uses a feature that I haven't pushed the documentation for yet, so I'll push that tonight, if you wait until then. (Or you can slop through my source code... have fun). Documentation pushed. Would be a byte less if a recent bugfix was on TIO.

Intended solution:

=1-1:--\1$ ;$

Try It Online!

Stephen

Posted 2017-07-27T16:42:10.187

Reputation: 12 293

Cracked! – notjagan – 2017-07-28T04:30:12.320

2

R, A000142, (Cracked)

Byte set:

-()*,`=cfinotu

Intended solution:

f=function(n,c=n==n)'if'(n,f(n-(n==n),c*n),c*(n==n))

JAD

Posted 2017-07-27T16:42:10.187

Reputation: 2 898

cracked! – Giuseppe – 2017-07-27T18:37:53.960

2

Python 2, A000045 (Cracked)

l:= input(a,forge)[]

it contains a whitespace and a newline
Try it Online!
Intended solution

Rod

Posted 2017-07-27T16:42:10.187

Reputation: 17 588

Cracked – Business Cat – 2017-07-27T18:30:42.507

2

PowerShell, A000012, 19 bytes, SAFE


$.0=[]acefilnorstv

Includes a newline and 18 other bytes. Good luck.

Try it online!


Intended Solution:

$a=$a[0]
$error[0].invocationinfo.offsetinline

Try it online!

This sets $a to be the value of an uninitialized variable $a indexed at [0]. Since that won't work, you get an error stating the following:

Cannot index into a null array.
At line:1 char:1
+ $a=$a[0]
+ ~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

The second line then pulls the .InvocationInfo and .OffsetInLine (i.e., where the error occurred), which in this case is always 1, and hence the A000012 sequence.

AdmBorkBork

Posted 2017-07-27T16:42:10.187

Reputation: 41 581

2

cQuents, A000027, Cracked


 !"#%&'()*+,-./0123456789:;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

That's right! You get all of ASCII! Wait... there's no $... what's $ again in cQuents? Oh, yeah, the index builtin. Well, tough luck :/

Intended Solution:

#|A:A

Try it online!

Stephen

Posted 2017-07-27T16:42:10.187

Reputation: 12 293

Cracked? – Adnan – 2017-07-27T18:56:12.200

@Adnan yup that works, I guess I shouldn't have opened it up as much as I did :P I couldn't think of any different ways to do it, good job. Added intended solution. – Stephen – 2017-07-27T18:57:18.430

2

CJam, A000042, cracked by Lynn

Byte set:

{})_%si

Business Cat

Posted 2017-07-27T16:42:10.187

Reputation: 8 927

1Cracked! Cute~ – Lynn – 2017-07-27T21:04:48.860

2

R, A000290, (cracked)

Byte set:

()%cfinotu

JAD

Posted 2017-07-27T16:42:10.187

Reputation: 2 898

no c, but everything else for function? That's horrifying. I know how to do this except for reading in input... – Giuseppe – 2017-07-27T19:52:02.027

@Giuseppe woops, the a shouldve been a c. sorry. – JAD – 2017-07-27T19:53:23.800

1This is what I get for doing this shit manually... – JAD – 2017-07-27T19:53:43.727

No worries; this is tough enough! – Giuseppe – 2017-07-27T19:54:56.623

cracked – Giuseppe – 2017-07-27T19:56:55.733

plus it's way easier to be a robber than a cop... – Giuseppe – 2017-07-27T19:57:51.053

I'll try to come up with something for you in R – Giuseppe – 2017-07-27T19:58:04.293

2

Ruby, A000004, 5 bytes, Cracked

Just messing around to start off. Should be easy for anyone familiar with Ruby. It's a low score, but whatever.

/np.$

Cracked, unintended exploit

Cracked (intended answer using n flag)

Value Ink

Posted 2017-07-27T16:42:10.187

Reputation: 10 608

Cracked? – Adnan – 2017-07-27T20:42:16.607

@Adnan Eh, I'll accept it. Should've required the n flag (which is the reason it's in the byte sequence, and would make $. equal 1) – Value Ink – 2017-07-27T20:45:26.127

Think I have your intended solution – histocrat – 2017-07-27T21:59:32.963

2

Python 3, A007504 (Cracked)

This byteset, including newline:

bfuwo)nm1h[=(t+;0a
sig%pr, le:]

My code does not provide infinite output, but can compute the entire b-list.

Azulflame

Posted 2017-07-27T16:42:10.187

Reputation: 161

1Welcome to PPCG! – Zacharý – 2017-07-28T00:03:47.170

1Cracked – Jonathan Allan – 2017-07-28T01:15:37.603

Jonathan, put it in python 3 and I'll test it when I get to my pc. – Azulflame – 2017-07-28T01:18:01.700

1Scrap that I used a . :( – Jonathan Allan – 2017-07-28T01:21:16.683

1I've fixed the crack. – Jonathan Allan – 2017-07-28T01:32:49.970

1...and migrated to Python 3. – Jonathan Allan – 2017-07-28T01:39:27.687

2

JavaScript (ES6), 13 10 bytes, A000045, Cracked

This should be easy.

This is the Fibonacci sequence: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.

Byte set:

$()-:<=>?[]_~

Edit:

It can be even done with the following 10 bytes:

$()-:=>?_~

Ra8

Posted 2017-07-27T16:42:10.187

Reputation: 391

Cracked! – user41805 – 2017-07-28T10:55:05.740

1This isn't [code-golf]: "Answers will be scored by the number of bytes in the byte set with score being good." More bytes are better. – LarsW – 2017-07-28T12:55:35.577

@LarsW on the other hand, more bytes also makes it easier to crack :) – JAD – 2017-07-28T13:48:51.783

2

Snowman, 212 bytes, A000042

#$%&*01:;=?@CEFGHIJLMOQUVXYZbcdefghijlmnopqsuvxyz~

... plus space, 0x00-0x1f inclusive, and 0x7f-0xff inclusive.

Doorknob

Posted 2017-07-27T16:42:10.187

Reputation: 68 138

2

Python3, A008615, Cracked

Bytemap (with newline):

n)ir=-
(u0*pt

Azulflame

Posted 2017-07-27T16:42:10.187

Reputation: 161

Cracked – xnor – 2017-07-28T06:45:01.607

2

R, A105311, (Cracked)

Byte set:

'%(),:=acdegilnopstx

JAD

Posted 2017-07-27T16:42:10.187

Reputation: 2 898

cracked! – Giuseppe – 2017-07-28T13:12:53.307

2

R, A105311, (cracked)

'%(),:=acdeginpstx

Let's try this without the l or o.

Since this has been cracked, the intended solution:

cat(diag(diag((a=scan()))%x%diag((a==a):a)),sep=''). diag is an interesting function, that can be used in three different ways. When presented with a single integer (diag(n)), it creates a NxN matrix with 1 on the diagonal. When presented with a vector (diag(1:n)), it creates an NxN matrix with the vector on the diagonal. When presented with a matrix (diag(diag(n))), it returns the diagonal as a vector. %x% computed the Kronecker product of two matrices, where each element in matrix 1 is multiplied with each element in matrix 2 separately. Doing this with a length n identity matrix and a 1:n diagonal matrix, creates a length n^2 diagonal matrix with 1:n repeated n times. diag extracts that again, and cat prints.

JAD

Posted 2017-07-27T16:42:10.187

Reputation: 2 898

1this'll be even more fun :) – Giuseppe – 2017-07-28T13:17:32.723

does this include a newline? – Giuseppe – 2017-07-28T13:57:57.967

@Giuseppe No newlines – JAD – 2017-07-28T13:59:19.407

1@Giuseppe and I just double double checked, this byteset is correct – JAD – 2017-07-28T13:59:44.260

cracked! -- I (incorrectly) used %o% before I realized that %x% existed. I guess I could have done 'i'=='i' for 1 but either way works, so. – Giuseppe – 2017-07-28T17:04:53.457

@Giuseppe to be honest, I noticed the function and searched a sequence to match it :p – JAD – 2017-07-28T17:36:37.543

@Giuseppe Added intended solution and explanation :) – JAD – 2017-07-28T18:14:54.433

2

Befunge, A000142, 29 Bytes, (Cracked)

Byte Set: @.$_ ^*:\v>-1&

If you can't tell, that Byte set includes a space.

This should be moderately easy to solve.

Edit: Forgot the "A" before the OEIS

Jordan

Posted 2017-07-27T16:42:10.187

Reputation: 31

Cracked – KSmarts – 2017-07-28T16:06:09.777

2

R, A057077, (cracked)

1, 1, -1, -1, 1, 1, -1, -1, etc

Byte set:

()*/=2abcinopst

0-indexed.

JAD

Posted 2017-07-27T16:42:10.187

Reputation: 2 898

Cracked. – ბიმო – 2017-07-31T14:04:13.140

2

C, A027868 (Cracked)

I don't expect this to last too long...

Byte set: int (){reu<5?-:/;}

theLambGoat

Posted 2017-07-27T16:42:10.187

Reputation: 119

1cracked – Christian Sievers – 2017-07-28T23:11:02.647

2

Python 2, A000142, cracked

Probably not too difficult, but since I really enjoyed solving these I thought I'll be a cop for once. Here's the byteset (first one is a space):

 ()*-:=abcdfghijklmoqruwyzABCDEFGHIJKLMNOPQRSTUVWXYZ

Intended solution

LyricLy's solution is much cleaner, but here's the one I had in mind:

Basically it's the same but instead of using bool(r) for 1 I used (r-r)**(r-r): f = lambda r: (r==r-r or r==(r-r)**(r-r))*(r-r)**(r-r) or r*blam(r-(r-r)**(r-r))

ბიმო

Posted 2017-07-27T16:42:10.187

Reputation: 15 345

Cracked. – LyricLy – 2017-08-06T10:32:09.057

2

CPython 3.6.2, A000002 (cracked)

I don't want anybody running out of single-character variables, so I'm giving you 70 pseudo-random characters courtesy of Latin-1.

·èõÉÀ]ýÜâô¾×l¡¿Ós¦Í½²uÊi´#¬©Åñ[);?ò
à¢ådêøóÎÐþÒÏ®,(Öß.=Õc_ö\§éºún$tÞb¨

This is evil. You can't make a for loop. You can't make a while loop. You can't even try to do anything, much less except. I have given a new line so that you can use more than one statement, but there aren't any spaces, tabs or even colons to let you use any sort of flow control. There are no numbers. There are no strings. There is nothing of any use.

You do have \ and #, though, so you can write clear code with soft breaks and comments.

That is, if you speak Jelly.

wizzwizz4

Posted 2017-07-27T16:42:10.187

Reputation: 1 895

cracked with over 28kb of code – pppery – 2017-08-04T15:30:32.040

@ppperry Congratulations. It is possible to get much smaller than that, though. – wizzwizz4 – 2017-08-04T21:12:54.717

I knew I was posting an unnecessarily long crack, but cracked is cracked, and it's only one day away from being safe. – pppery – 2017-08-04T21:22:06.167

@ppperry Fair point. Nobody else is probably going to attempt it, so there's no point saying that it's suboptimal. – wizzwizz4 – 2017-08-05T08:52:19.397

@ppperry That's not supposed to be there... Oh well. – wizzwizz4 – 2017-08-05T13:49:30.453

2

JavaScript (ES6), A000035, cracked

A000035 is n mod 2, in case the site goes down or you're too lazy to check yourself. Charset:

023456789\`efu

Taking the "somehow still Turing-complete" route. I suppose I could've added 51 or so non-ASCII chars to improve my score, but that feels kind of like cheating.

Takes input through prompt and outputs through alert, and can be run in any modern browser.


Intended solution:

\u0046\u0075\u006e\u0063\u0074\u0069\u006f\u006e`\u0046\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0028\u0046\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0028\u0022\u0072\u0065\u0074\u0075\u0072\u006e\u0028\u0034\u0038\u0032\u002f\u0032\u0029\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0032\u0032\u0029\\u002\u0062\u0027\u0065\u0072\u0074\u0028\u0070\u0072\u006f\\u006\u0064\u0070\u0074\u0028\u0029\u0025\u0032\u0029\u0027\u0022\u0029\u0028\u0029\u0029\u0028\u0029```

which, when the escapes are removed, translates to

Function`Function(Function("return(482/2).toString(22)\u002b'ert(pro\u006dpt()%2)'")())()```

which simplifies again to

Function`Function(Function("return(482/2).toString(22)+'ert(prompt()%2)'")())()```

This works because JavaScript allows \uXXXX escapes in variable names (though not in arbitrary code, as Java does). The outer Function`code``` is necessary to run the code at all, since the entire thing needs to be escaped.

(If you're confused about how this works: JavaScript has something called tagged template literals, which for our purposes is just a function call on a string; it just uses f`string` instead of f("code"). So Function`code``` is about the same as Function("code")().)

Now, because of the lack of the hexadecimal chars 1abcd, we'll have to double-encode certain necessary characters such as the m in prompt(). So instead of \u006d, it becomes \\u006\u0064. But now we need to evaluate this as a string twice to make sure this gets fully decoded. (pro\u006dpt() would work just fine, but using \u002b as + would not.) This is what the second Function(code)() is for.

One further obstacle exists: there's no 1 in the charset, necessary to create an a from \u0061. So there's no way to generate an a by unescaping a string (I checked, the octal representation is \141). Instead, we can generate it with e.g. (20/2).toString(20). I went ahead and generated al in this manner because l would require double-escaping like m.

But the problem now is that the innermost Function call is now just generating a string. In order to actually execute it, we need to return it from the function and pass it to a third Function call. This we do, and finally our journey is complete.

*I am aware of using ${} within template literals, but those aren't in the charset, alright?

ETHproductions

Posted 2017-07-27T16:42:10.187

Reputation: 47 880

Cracked! – Dom Hastings – 2017-08-02T11:36:07.630

2

Cubically, A016742 (Cracked)

This sequence is even square numbers: 0, 4, 16, 36, 64, ...

Byte set:

  • Any letter except [UuDdLlRrFfBb]
  • The digits [6789]
  • Any symbol except [-^:@/]
  • Anything not mentioned in the ASCII character set, including whitespace.

Try It Online!

TehPers

Posted 2017-07-27T16:42:10.187

Reputation: 899

You don't need to include that last note; languages (and language versions) made after the challenge are perfectly valid as of a new consensus. – MD XF – 2017-08-02T02:09:15.630

@MDXF I wanted to specify which version to use. It was created before loops, but after input. Future language changes may warrant changes to the answer. – TehPers – 2017-08-02T03:32:21.550

I suggest not changing the answer after this has already been posted. People may be working on a crack. – MD XF – 2017-08-02T03:48:46.100

@MDXF I know, I won't. I was just saying why I specified the version. I guess if anyone wants to crack it with future language versions, they're welcome to. – TehPers – 2017-08-02T04:04:33.490

1Cracked – Kamil Drakari – 2017-08-07T13:31:39.123

1

Python 3, A000002, Cracked with the intended solution

These are the bytes of a full program, 0-indexed solution for the Kolakoski sequence: OEIS A000002.

pg*rn:e+%2a tu]
(=foi[)1l,

This contains a space, a newline, and all the other characters in the snippet above. Hopefully this won't be too easy to crack :)

Mr. Xcoder

Posted 2017-07-27T16:42:10.187

Reputation: 39 774

1Cracked! – notjagan – 2017-07-27T18:14:12.430

1

Python 2, A000042, 11 Bytes (Cracked)

Byte set:

int(pru*1)'

Answer:

print '1'*input()

Note: This is my first ever answer on PPCG, and I may have made a mistake...

Nathan Dimmer

Posted 2017-07-27T16:42:10.187

Reputation: 511

Cracked? This doesn't work for the 0 term, but it seems that this was the intended program. – notjagan – 2017-07-27T18:37:02.407

@notjagan also what I just got - Bobawob, does yours work for 0? – Stephen – 2017-07-27T18:37:26.903

Could it be 1 indexed instead? – JAD – 2017-07-27T18:38:14.250

Yes, it was the intended program. Sorry, did I need to include the 0th term? Like I said, this is my first ever challenge. – Nathan Dimmer – 2017-07-27T18:39:24.383

@Bobawob just switch it to this sequence, which is the same just without a leading 0

– Stephen – 2017-07-27T19:19:02.080

1

cQuents, A033307, Safe

Fe_pz:"/`'-2;

Try it online!

Explanation:

":z--F_p-2
Try it online! ": means a char sequence; basically, the output needed. Now, we need to just get the current index, which would usually be $. z starts out as 0 and is the previous number from then on, so we need just to add one to it. -- is the equivalent of +, and F_p-2 means Floor(Pi-2), which works.

Stephen

Posted 2017-07-27T16:42:10.187

Reputation: 12 293

1

JavaScript (ES6), 4 bytes, A005408 (Cracked)

This should be an easy one. Odd numbers: a(n) = 2n+1

Byte set:

$+=>

Arnauld

Posted 2017-07-27T16:42:10.187

Reputation: 111 334

3Cracked! (I hope, it's my first Cops & Robbers answer) – LarsW – 2017-07-27T22:02:16.043

1

CJam, A000142, 8 bytes, Cracked

Byteset: {}*+)%1\

geokavel

Posted 2017-07-27T16:42:10.187

Reputation: 6 352

Cracked – Business Cat – 2017-07-28T13:19:39.260

1

Python 2, A006577, Cracked

Byte set:

+s-t,n u
r)i1(d>]f[:e&

Shouldn't be too hard, but still fun.

EDIT: Cracked by @BruceForte. The crack looks just about identical to my crack, but here's mine for reference.

Try it Online

Arnold Palmer

Posted 2017-07-27T16:42:10.187

Reputation: 443

Did you mean to include a p, or was that intentionally left out? – Azulflame – 2017-07-28T06:36:30.097

1

@Azulflame p isn't needed since it seems that printing is not required as long as the value is somehow returned. See here for a non-contested, and valid, crack.

– Arnold Palmer – 2017-07-28T11:25:04.767

Cracked. – ბიმო – 2017-07-29T01:17:59.333

1

Python 2, A001146, Cracked

Byte set:

print(2*u)

Nathan Dimmer

Posted 2017-07-27T16:42:10.187

Reputation: 511

Cracked – Lynn – 2017-07-28T13:11:47.287

1

Unreadable, A000027, 92 bytes, Cracked

Byte Set:

!"#%&'()*+,-./0123456789:;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Also add space and newline

Nathan Dimmer

Posted 2017-07-27T16:42:10.187

Reputation: 511

Why not include all of the bytes for maximum score? There is no loss to adding more bytes if they can't be used. – Post Rock Garf Hunter – 2017-07-28T13:52:50.090

There are no other bytes in unreadable that I used. I don't even think that there are other bytes in the language... Could I add all of ASCII even if my language doesn't use some of the characters? – Nathan Dimmer – 2017-07-28T13:55:33.800

Since Unreadable is encoded in ASCII you can and probably should use all the characters in ASCII. – Post Rock Garf Hunter – 2017-07-28T14:21:20.083

Cracked – Azulflame – 2017-07-28T14:51:06.280

It's not cracked yet! You are forgetting that the first value in A000027 in 1, not 0. – Nathan Dimmer – 2017-07-28T14:52:35.513

My answer is 1-indexed – Azulflame – 2017-07-28T14:53:27.267

Then it's cracked. You're right, I forgot about that... – Nathan Dimmer – 2017-07-28T14:55:20.847

I went ahead and added the 0-index version for you – Azulflame – 2017-07-28T14:56:56.470

1

LOLCODE, A000290, Cracked

Byte set:

.12ABDEFGHIKLMNOPRSTUVXY

The byte set also includes space and newline.

HAS FUNZ!

Nathan Dimmer

Posted 2017-07-27T16:42:10.187

Reputation: 511

1Are we allowed newlines? As far as the interpreter I'm using (your link), they are required to not get errors. – Azulflame – 2017-07-28T15:12:40.530

Yes, there are newlines... Sorry! – Nathan Dimmer – 2017-07-28T15:16:58.090

Also 1.2 (or other HAI version) would be needed to run – Azulflame – 2017-07-28T15:18:47.073

Cracked – Azulflame – 2017-07-28T15:28:01.353

1

Perl 5, A007094 (Cracked)

Numbers in base 8

Byte set sub {if($_[1]!=%/)ret-n;}

Try it online!

theLambGoat

Posted 2017-07-27T16:42:10.187

Reputation: 119

Two r in your byteset – Value Ink – 2017-07-28T19:00:25.770

1I like how your byteset as-is looks like valid Perl. – AdmBorkBork – 2017-07-28T20:07:49.017

1Cracked. – ბიმო – 2017-07-30T18:05:33.207

1

Octave, A000045

This produces the Fibonacci numbers, OEIS A000045. There's both a space and a newline in there.

It's 0-indexed, so input 0 gives 0.


 ()-;=>cdefinotu

Stewie Griffin

Posted 2017-07-27T16:42:10.187

Reputation: 43 471

Cracked. – ბიმო – 2017-07-28T22:59:42.510

1

JavaScript, A000004 (Cracked)

Look from the other side

at~N+1

Step Hen's solution

~NaN+1

My solution #1

~1+1+1

#2

~~NaN

Евгений Новиков

Posted 2017-07-27T16:42:10.187

Reputation: 987

1Cracked (at least for Chrome console) – Stephen – 2017-07-29T02:19:09.197

1

Ly, A005150, Cracked

!$+-012<=>JS[]lnprsu

Well. Let's see how this plays out.

LyricLy

Posted 2017-07-27T16:42:10.187

Reputation: 3 313

I wanted to continue working on it, but you added a -, therefore: cracked. Nice way to promote your language!

– Christian Sievers – 2017-07-29T21:21:44.943

1

dc, A028444 (cracked)

-?/*+23568dpr

There are no spaces in the byte set, but that’s not a big deal for dc.

Sequence is indexed at 0.

Note: Rado’s Sigma function grows faster than any computable function and is thus noncomputable!

Intended solution: ?dddddd***3*rdd**22*-rd*53*+r26*-8/p

user15259

Posted 2017-07-27T16:42:10.187

Reputation:

Cracked. – ბიმო – 2017-07-29T15:08:29.107

1

CPython 3.6.2, A000796 (cracked)

I like Latin-1. Here's another 70 characters.

,Ðûô[u÷ÎÆ»énb¤Äö]?có´å¡ùÇõÓ«;Ñ$èñÙdÁ¼
¢üÔltsð½(þÚ#ä.×çÈýŧã¯\)³íï¬Â±¥_Ê=iÌ

This bunch of characters can calculate the decimal digits of pi. Surely this requires flow control. And yet there isn't a colon, so that is impossible. You can't even eval a string when there is neither eval nor a string.

I'll give a hint: my program takes input from stdin and outputs to stdout, but I am almost completely certain that it is possible to use other I/O methods.

wizzwizz4

Posted 2017-07-27T16:42:10.187

Reputation: 1 895

For anyone wondering, the available ASCII chars are #$(),.;=?[\]_bcdilnstu and newline, and the non-ASCII ones are ¡¢¤¥§«¬¯±³´»¼½ÁÂÄÅÆÇÈÊÌÎÐÑÓÔ×ÙÚãäåçèéíïðñóôõö÷ùûüýþ. – ETHproductions – 2017-07-31T14:22:20.987

@ETHproductions Now you've spoiled it! :-) At least it makes my love of FreeBSD clear. – wizzwizz4 – 2017-07-31T14:32:16.350

It's really not hard to sort the charset... :P Now I'm thinking this must be a template of some sort, since your other answer uses exactly the same ASCII set. I don't know zip about why you would be so specific about CPython 3.6.2 though, so I'll leave that to the Python experts... – ETHproductions – 2017-07-31T14:35:09.700

@ETHproductions It's because the subset I've chosen is Turing complete. It's because I'm not about to claim that it works in a version that I haven't tested it in, and I've been very hackish. – wizzwizz4 – 2017-07-31T14:52:03.953

@ppperry I felt like that many, many times. It took me two days to work out a solution, and I knew what I was going for to start with! – wizzwizz4 – 2017-08-04T08:42:47.623

@ppperry You have è and é, if that helps. :-) – wizzwizz4 – 2017-08-04T08:43:42.687

Cracked, almost twice as long as the other two cracks. – pppery – 2017-08-04T18:22:32.810

@ppperry Amazing. I've just realised that I forgot to upvote your cracks. They definitely deserve it. – wizzwizz4 – 2017-08-04T21:15:52.927

0

R, A000027 (Cracked)

An easy one to warm up :)

Byteset:

eiytnd

Solution:

identity returns the input, so maps n to n.

JAD

Posted 2017-07-27T16:42:10.187

Reputation: 2 898

Cracked? – Shaggy – 2017-07-27T17:36:35.270

@Shaggy Wouldn't that just return the integer? Shouldn't it return a whole sequence? Or maybe Jarko misunderstood? – Mr. Xcoder – 2017-07-27T17:37:30.423

@MrXcoder: Or maybe I did! :D – Shaggy – 2017-07-27T17:39:02.493

It should return the nth entry, so this works. – JAD – 2017-07-27T17:44:43.123

0

Python 2, 24 bytes, A001246, cracked

Byte set:


 )(+*-/12:=<acbdfmlonrx

Try it online!

totallyhuman

Posted 2017-07-27T16:42:10.187

Reputation: 15 378

1Cracked – Mr. Xcoder – 2017-07-27T18:31:02.920

Agh, no fair. :P – totallyhuman – 2017-07-27T18:31:24.907

0

Python 2, 21 bytes, A157433, cracked


6ut1 28rp5=)ni+03(*7

Try it online!

Original solution:

n=input() print 128*n**2+2336*n+10657

Probably super easy, but eh, I have =).

totallyhuman

Posted 2017-07-27T16:42:10.187

Reputation: 15 378

2Cracked. – Adnan – 2017-07-27T18:59:06.457

Well, I had already posted this, so double cracked.

– Stewie Griffin – 2017-07-27T19:04:25.947

0

Jelly, 16 bytes, A000042 (Cracked)

Byte Set:

%1@JOiv¤ØȷḌṁị“”€

(The two quotes are different: one is opening and the other is closing).

(uses Jelly codepage)

The sequence is: a(n) is the unary representation of n.

fireflame241

Posted 2017-07-27T16:42:10.187

Reputation: 7 021

This challenge requires you to submit a character set to use rather than a list of characters – Blue – 2017-07-27T19:07:37.690

Cracked. – Adnan – 2017-07-27T19:13:05.303

Well a character set rather than list makes this quite a bit easier. – fireflame241 – 2017-07-27T19:16:31.853

0

Python 3, 19 byteset, A000290, Cracked

This is the perfect squares: 0, 1, 4, 9, ....

Byteset:

(fam, l+db-ise=10:)

Note: I had two iterations with duplicate characters (and missing characters) because I'm dumb.

My solution (not very efficient):

f=lambda l,a=1,b=0:f(l-1,a+1+1,b+a) if l else b

Try it online!

Stephen

Posted 2017-07-27T16:42:10.187

Reputation: 12 293

Why are there two as in the byteset – pppery – 2017-07-27T20:52:07.617

@ppperry my bad, sorry. Fixed. – Stephen – 2017-07-27T21:02:42.533

still two 1s. – pppery – 2017-07-27T21:12:57.400

@ppperry I don't know why this was so hard - I believe it's fixed now, so sorry 0.o – Stephen – 2017-07-27T21:17:29.747

1Cracked! – Lynn – 2017-07-27T21:17:56.970

@Lynn and you did it even without a , because I screwed up my byteset. Good job! Editing in mine. – Stephen – 2017-07-27T21:19:23.453

0

MATL, 11 bytes, A000984

Uses some of these bytes (ASCII):

$&)+/:HZdep

Due to floating-point precision, results are only guaranteed to be accurate up to the 26-th term. I hope that's acceptable.

Luis Mendo

Posted 2017-07-27T16:42:10.187

Reputation: 87 464

0

Ruby, A000217, 15 bytes, Cracked

Uses the -p flag to take input from stdin and output to stdout.

$mu.to_vim[d=s]

Intended solution:

$_=[$...$_.to_i][$..div$$].sum

Value Ink

Posted 2017-07-27T16:42:10.187

Reputation: 10 608

Cracked. – Doorknob – 2017-07-28T12:19:03.090

0

JavaScript (ES6), 10 bytes, A000007

Byte set: -)$>yRa=A(

iovoid

Posted 2017-07-27T16:42:10.187

Reputation: 411

OEIS is currently down, so for anyone looking, A000007 is a(n)=0^n, which is 1,0,0,0,0,0,0,0,.... – Birjolaxew – 2017-07-28T11:08:27.817

Cracked! – user41805 – 2017-07-28T11:15:31.870

Cracked with 6 bytes – Birjolaxew – 2017-07-28T11:16:49.537

0

Seed, A000027 (Counting Numbers) (Cracked)

You may use any valid character in Seed:

[0-9 ]

Have fun! The resulting Befunge program is short, so you should definitely be able to brute force it within a week (if you're crazy enough to do that).

My Solution:

My solution is a little bit longer than Lynn's solution...

4 47142938850356537668025719950342285215695875470457212766920093958965599014291682211474803930206233718243166021324700185443274842742744297183042397910454208210130742260519105651032450664856693714718759816232968955289663444878636053035645231246428917992493766505872029989544065894418166685284738859999912471659057565000392419689361271972485444731284404987238803115210428572945108908191097214978382112218242627719651728712577306652405452922782307249485947045215982784790396555726144526602778473387279897334709142853151393812930171163300904436548870603006549005515709074682843356844201220668045057407146751793470423217099467145255174198241606814578351260769359571053755888106818197239116973006365593563235361647743411341624822052103816968153274122434280200888824954875622811325064255818154979564925710534165572852442761249176778416688044630942040966271963723430245979221181930857841829694362184653939393940015797332978459794253176110314873994228261888801228999293570329618551223457182420746927212801550646743152754821640064626761542582557138452651970009253770914346130172884305622027370793496993281847017017643506435562229916984107083951938286577012273222191422054315198157936674247934699496471202544270325061352014830137178245082445717253260177560449757186762445707057028987371278573629077370632470496186218574320801798046510846708620502139560277546345198686675095078255875594169064796673074708822106659920187882062247609587560174781170641367430722951002242213604709887062481149928551745163110045572994991844223216663621203042075294195007458339984527333125093390189721042315604498435269143549420166732177200370228527273606218617171975362431824163269672003982537382982066136613799403024924018145511099557720492305303748099327810811511080314262364010281851651151072957475365629128068033597559560186625877942054704386175359499573139930378099420149452745731809033737756051947913924265484582800618244473333957173960222243311738522875022546610298627492222587971756897328087719407454153248557203886421828643453889090192355970705084245312184441674098515659253482621260617211786550204852895652236768886852209506535523414991099331857674826373947830587028494510697603296607361093480842935154672353288419699354739650168309017848485131553416956405911683526896232046773861961911767319373432460217755874481607587604361758089936007730253450733375831228127106295259261723611771334468553746160739548375950046831923765023329346333968732796413192682936767133122325481273354810124729664400173367781325488656859581438769940474229394692089519981810909719628263357284973442177568041416363386891516725592952892168077523560584005586276794967492051823290615767599202657060820223928678900774601616908031321346819422162123048834532926372862962159255934240435694566497798544870186550219886342379298214007368081326725550763589917206162393892085506551547475259270513853987294911388226039365971184089828739349642347312302559286882065147953715607221387657413593069535573044067517274676745306396611760657091792151803798859781616126637075577936361782593546481811651450365118155866449850474140044293772144065341051900055416408240857348697564252386403719942197789892382627153382011984996644288495699209129097948405810551134169739499539470610790009272281731894550593600643079188663110695127017324336488487580799309995227054576681630676222848231145106058050452439356753552872060820230589152143268436210090733908507724084889788244157692417246691477400856716677564609725979550100138132944851304473466485128295568194188600539248624248078558656162635444219199062786468487219220160009464328883337821175254405764395407405891483810757405446047244460754827113527540703326714751461178900155717130399854320238635234164429884664271159504714368008455653061601459723385727262777232764564573673873772208222457183846136405752956618693937985108892893985455752900109747276359722218661153262749015305405756329658744441481575547254529963547290233424398012124166511178581644295375904189900373061373853471489496222876806462541916199940534855562482928962080779491332702863921351256172643450743469939804784306286205587292552998145733381435925702081855362374409244827640579395543246453123597643190692540938806013686596772963034314363354010871521973403725835700408947963387110274004628480425371734331910891935140460595015189156420163115488068088520486798706569490006916112796733633895122682258059129006594304004203161927532260544237735899697152969940248758172957772287759336801595261613720119580891726456931895143417855893848415813470404827691913198395587019754512910027895295524122640301750273229263700158423422494600783294301471077720755163088097928474808200825811331834384330131090616226795924514158947235407965623454021092089105236025774499670509312408897668570458845620423145441557589436789713088947243846896823513743795131462439985465454654508125778329519910755888052092925306512948187971238329609568930378458165199920437525216462470929107070404811453630873763646812061350580161443056020563505260186672704841049972564837245044063297483792279875783885332694312955039151703943626840229495942158368887321883672956326501715270278543111513846830331160757034936022626603927067201550075630055296060821698451711220226998542584472966056248420845670285305975196992649811350779376980410458954534606441616709943508562093877902996409050522302853982991210150961788557227893313889825011281746787557452112185337922107257901043776646541934164147921577497411930472664026894384833716916001510862714001082105916461354489145794983975342462583664139916994875750562786683033654066234795041967161156949148282294752956521537053912878502375506909313842856133697079387338725355753694963250928996068864246591064004864326952187480597051907196284596345012237848475736570739686898404311769576575237233438553293161482584973742517010294566986396986963333792493710800886286588229647009335037917560300340277732774595016553407284174237194411762775063365955286488230300605484062176178336345135677894004813511507360069468591733327248913533084977745451497662084575239380871947004076480854627777980299105041121280

TehPers

Posted 2017-07-27T16:42:10.187

Reputation: 899

Can you link an online interpreter? I can't seem to find one – Azulflame – 2017-07-28T17:29:47.730

@Azulflame There's no interpreter because the language is converted to Befunge before being interpreted. Use the python script provided on esolangs.org and TIO's Befunge-98 interpreter.

– TehPers – 2017-07-28T17:32:19.753

Gotcha. Only took about a minute of bruteforcing on my laptop! – Lynn – 2017-07-28T17:41:07.380

@Lynn Nice job! I knew I should have gone with a more complex series :P – TehPers – 2017-07-28T17:41:53.833

@Lynn Care to try a harder one?

– TehPers – 2017-07-28T19:08:55.957

0

C, A000312 (cracked)

-,;:?(){} eglnortu

The specs call for a complete program, however this would add many more characters to the byte set making the challenge trivial. Instead, you’ll be providing the code within this template:

«your-code-composed-of-characters-in-byte-set»

#include <stdlib.h>
#include <stdio.h>

int main(int argc, char** argv)
{
    int n = argc > 1? atoi(argv[1]): 0;
    printf("%d ^ %d = %lld\n", n, n, «your-function-name»(n));
    return 0;
}

Note that your code comes before the #includes.

Answer: long long l(long long o,long long n){return o- -n;} long long o(long long n,long long g){return g?(--g?l(o(n,g),n):n):g;} long long n(long long g,long long l){return l?o(n(g,--l),g):- --l;} long long g(long long l){return n(l,l);} Addition l is expressed as subtraction of a negated value m + n = m − (−n), multiplication o as a series of additions m × n = m × (n − 1) + m, exponentiation n as a series of multiplications mⁿ = mⁿ⁻¹ × m, and finally the function g which calls the exponentiation function. On machines where long long is 64 bits wide, this code will give incorrect answers for n ≥ 16, but note there are machines out there with word lengths of more than 64 bits, e.g. the Ethereum Virtual Machine (EVM) with 256-bit words where long long could naturally accommodate values ≫ 2⁶⁴. So in theory the code would work for n ≥ 16.

user15259

Posted 2017-07-27T16:42:10.187

Reputation:

Cracked – Christian Sievers – 2017-07-30T17:02:34.040

@ChristianSievers - Great work! – None – 2017-07-31T11:57:05.823

Your code has an unlucky combination of o recursing on the second argument, and n calling o in a way such that the second argument is potentially much bigger than the first. If you avoid this, you will see your numbers overflowing long before your stack does. – Christian Sievers – 2017-07-31T12:54:03.823

Thanks for that! Have reordered the parameters and revised the spoiler. – None – 2017-07-31T13:46:28.897

0

Haskell, A001107 (cracked)

This one is easier, the sequence is growing slower and the charset is smaller.

Compute the decagonal numbers n(4n-3) using the following charset of size 9:

.,_-=[ ]!

Again there is no newline.

Christian Sievers

Posted 2017-07-27T16:42:10.187

Reputation: 6 366

cracked – Laikoni – 2017-07-30T22:35:44.507

0

CPython 3.6.2, A000720 (cracked)

I have decided to squeeze as many characters out of Latin-1 as possible without simplifying the challenge. There are some unprintables, so I will provide the characters in the following format:

print(",".join((
    "0x0-0x8",
    "0xa-0x1f",  #inc. \n
    "0x23-0x24",  # chars #$
    "0x28-0x29",  # chars ()
    "0x2c",  # char ,
    "0x2e",  # char .
    "0x3b",  # char ;
    "0x3d",  # char =
    "0x3f",  # char ?
    "0x41-0x5d",  # A-Z and chars [\]
    "0x5f",  # char _
    "0x62-0x64", # chars bcd
    "0x69",  # char i
    "0x6c",  # char l
    "0x6e",  # char n
    "0x73-0x75", # chars stu
    "0x7f-0xff"
)))

I think that makes 208 characters. Feel free to use any of these.

I did not hard-code; that would take so many characters I would have to start meta-meta-programming. This set of characters is provably Turing-complete.

wizzwizz4

Posted 2017-07-27T16:42:10.187

Reputation: 1 895

Why the downvote? Dennis did a similar thing. – wizzwizz4 – 2017-08-01T13:42:54.177

I wasn't the downvoter, and I don't think this is why the downvote, but couldn't you just say "I used 0x0-0x8,0xa-0x1f,0x23-0x24,0x28-0x29,0x2c,0x2e,0x3b,0x3d,0x3f,0x41-0x5d,0x5f,0x62-0x64,0x69,0x6c,0x6e,0x73-0x75,0x7f-0xff"? – MD XF – 2017-08-02T03:25:05.623

@MDXF I could, but then there wouldn't be the comments explaining what the characters were and people would have to manually look things up or write a program to get the printable characters out of it. (I admit that my "format" isn't the best, though.) – wizzwizz4 – 2017-08-02T11:35:21.220

cracked verbosely. Sorry, I posted this on the wrong cop answer previously. – pppery – 2017-08-04T16:14:41.610

0

shortC, A000240, 64 bytes

Uses the characters in this ASCII map:

    "     %     ( ) * + , -     
  1 2                       >   
@ A         F     I             
    R   T             [   ]     
  a     d         i         n o 
p       t     w       {   }    

Map credit: ETHproductions

MD XF

Posted 2017-07-27T16:42:10.187

Reputation: 11 605

By far the most random place I've ever found myself given credit for something :P – ETHproductions – 2017-08-04T00:50:12.797

0

Python 2, A005150 (Look and say), safe

 "()+,.01:=ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]_celnortwx

Gee, you don't didn't have much, do did you?

Intended solution:

exec("FROM ITERTOOLS IMPORT GROUPBY\nA=\"1\"\nFOR _ IN RANGE(1,INT(INPUT())):\n\tA=[\"\".JOIN(GRP)FOR M,GRP IN GROUPBY(A)]\n\tA=\"\".JOIN([STR(LEN(X))+X[0]FOR X IN A])\nPRINT(A)".lower()) You have all of the uppercase characters, and just enough lowercase ones for \n, \t, exec and lower.

LyricLy

Posted 2017-07-27T16:42:10.187

Reputation: 3 313

-3

Javascript (ES6), A000079, 6 Bytes

[]()+!

Hint:

Intended solution is 25496 characters long.

Draco18s no longer trusts SE

Posted 2017-07-27T16:42:10.187

Reputation: 3 053

Cracked – L3viathan – 2017-08-07T14:43:13.887

@L3viathan Close enough. :) I'd actually used $=>Math.pow(2,$), but you had the right idea. JavaScript is weird. – Draco18s no longer trusts SE – 2017-08-07T18:48:27.300