45
3
This challenge has two threads. This is the cops' thread. The robbers' thread is located here.
Your challenge is to choose an OEIS sequence and write two full programs in two different languages that produces that nth item in the sequence when given an n via STDIN, or an other forms of standard input, where n is any positive number. However your two programs must be anagrams, meaning each can be rearranged from the other's letters.
Programs must output the decimal of the number followed by optional whitespace to STDOUT. Programs may output to STDERR however it should be ignored and if the hidden case does so it must be clearly stated that this is the case.
If you wish you may also output by character code. However if you do so in your hidden solution you must state such in the body of your submission.
You will then present the OEIS number, the source code for and the name of one language it is in.
Robbers will crack your submission if they find an anagram of the original submission that runs in a language other than the one you already presented. To crack an answer they must only find any language and program which produces the sequence and is an anagram of the original, not necessarily the answer the you were thinking about.
Thus you are incentivized to make it as hard as possible to find any language that does the task using their list of symbols.
Scoring
This is code-golf so the shortest un-cracked program is the winner.
Languages
Languages will be considered different if the two proposed solutions do not complete the task in both languages. This will include different versions of the same language as long as neither the cop's solution or the robber's solution produce the correct output in the other's language.
i.e. If the there are two solutions 1 and 2 that are in language A and B respectively solution 2 must not produce the correct output in language A and solution 1 must not produce the correct output in language B.
Safety
Once your submission has been uncracked for a week you may post your solution and declare your post safe. If after a week you choose not to post a solution your answer may still be cracked.
4
To browse through random OEIS sequences for ideas, go to https://oeis.org/webcam
– mbomb007 – 2016-11-09T18:15:20.657How would it work with languages that like to use flags to the interpreter, such as perl? Are they disqualified? Are flags counted as part of the code? Are flags "free" (not included in code or divulged at all)? – Emigna – 2016-11-09T19:19:13.567
Can the hidden program exit with an error (after producing the output)? Should that be indicated in the answer? – Luis Mendo – 2016-11-09T19:34:49.487
@LuisMendo That is fine but should be indicated. – Post Rock Garf Hunter – 2016-11-09T19:35:36.900
@Emigna I would like for flags to be divulged if they are not standard flags for running in the language. – Post Rock Garf Hunter – 2016-11-09T19:37:12.327
Grammar nitpick: "Cop's Thread" and "Robber's Thread" should be "Cops' Thread" and "Robbers' Thread" – NobodyNada - Reinstate Monica – 2016-11-09T19:40:35.300
@DrMcMoylex Seeing as I have already done that myself, It is certainly allowed I will update the question – Post Rock Garf Hunter – 2016-11-09T20:16:33.277
I think you should include that in the text – Luis Mendo – 2016-11-09T20:24:03.357
Some reading for writing CnR challenges. – Martin Ender – 2016-11-09T20:57:06.827
Is it allowed to input/output a character, and use their character code to represent the numbers? – jimmy23013 – 2016-11-09T21:42:01.507
@jimmy23013 No. – Post Rock Garf Hunter – 2016-11-09T21:42:28.140
@WheatWizard I want to enter a java entry but can people just switch the names of the variables and call it a done deal? – tuskiomi – 2016-11-09T21:51:47.913
@tuskiomi No they cannot. The polyglot needs to be in different language. – Post Rock Garf Hunter – 2016-11-09T21:53:55.543
If the crack doesn't print the exact output, but still a understandable format of the sequence, does it count? – Rɪᴋᴇʀ – 2016-11-10T03:34:08.187
@EasterlyIrk As long as both are proper formats they do not have to be the same – Post Rock Garf Hunter – 2016-11-10T03:37:23.360
@WheatWizard :/ even if the output formats were known? – Rɪᴋᴇʀ – 2016-11-10T03:52:42.133
@EasterlyIrk what do you mean? – Post Rock Garf Hunter – 2016-11-10T03:53:19.500
@WheatWizard it was different from the output format of the real crack and the output of the given code. – Rɪᴋᴇʀ – 2016-11-10T03:54:18.197
@EasterlyIrk yes that is still a valid crack – Post Rock Garf Hunter – 2016-11-10T03:54:48.413
@WheatWizard oh well – Rɪᴋᴇʀ – 2016-11-10T03:54:56.227
Can it be output like
[<number>]
? – Rɪᴋᴇʀ – 2016-11-10T04:17:05.227Let us continue this discussion in chat.
– Post Rock Garf Hunter – 2016-11-10T04:17:19.557My Python submission is correct for the first 15 entries, but loses precision after that. The anagrammed solution has exactly the same problem. Can I keep it, mentioning that it's accurate to 15 terms? (I can't imagine that no other submissions lose precision at some point...) – ETHproductions – 2016-11-11T03:03:29.923
@ETHproductions I assume that this is a floating point error, so I think that as long as you are specifying that it is looses precision and both solutions would work as intended given infinite floating precision you are ok. – Post Rock Garf Hunter – 2016-11-11T06:28:10.083
1
Not sure if this would be helpful to anyone else but this highlights any remaining missing characters or any duplicated ones: http://codepen.io/anon/pen/BQjxRK
– Dom Hastings – 2016-11-11T08:12:56.7831It'd be nice if there was a stack snippet to show uncracked answers, oldest first. – mbomb007 – 2016-11-16T15:57:30.530