19
0
This is a cops-and-robbers challenge, the robbers thread can be found here.
Your task is to write some code that outputs an OEIS sequence, and contains the name of the sequence in the code (A______
) and outputs a second separate sequence when the name of the sequence in the code is changed to the name of the second sequence.
Here's an example in Haskell that works for A000217 and A000290.
f x|last"A000217"=='0'=x^2|1>0=sum[1..x]
You are then to reveal one of the two sequences, and the code keeping the second sequence a secret. Robbers will attempt to figure out what the hidden sequence is. If a robber manages to determine what your sequence is (or another sequence that fits the criteria) you answer is cracked. If none do so in a week of your answer being posted you may mark your answer as Safe and reveal the intended solution for verification. Safe answers cannot be cracked.
Input Output
Taken from here
Your code can be a function or complete program that takes n via a standard input method and outputs the nth term of the sequence as indexed by the provided index on the OEIS page.
You must support all values provided in the OEIS b files for that sequence, any number not in the b files need not be supported.
Scoring
Your score will be the number of bytes in your code, with less bytes being better.
1Your score will be the number of bytes in your code, with less bytes being better. - Why isn't this tagged [tag:code-golf], then? – Mr. Xcoder – 2017-08-03T14:44:57.753
@Mr.Xcoder I forgot to. Don't read into these things too much ;) – Post Rock Garf Hunter – 2017-08-03T14:46:04.327
So code should output sequence of some length (defined or not?) or n-th element of sequence? – Dead Possum – 2017-08-03T14:55:00.453
@DeadPossum *nth term*. – Mr. Xcoder – 2017-08-03T14:56:02.093
@WheatWizard guess I was looking somewhere else, but monitor. My bad – Dead Possum – 2017-08-03T14:57:36.503
May we choose constant sequences (We should be allowed, IMHO)? – Mr. Xcoder – 2017-08-03T14:59:36.757
@Mr.Xcoder yes constant sequences are fine, (probably rather easy to crack though). Did something give you the impression they were disallowed? – Post Rock Garf Hunter – 2017-08-03T15:00:31.230
@WheatWizard Did something give you the impression they were disallowed? - No, of course not. – Mr. Xcoder – 2017-08-03T15:01:49.703
Can we amend leading zeroes in sequence number? Like A1 – Dead Possum – 2017-08-03T15:10:06.487
@DeadPossum No you cannot. – Post Rock Garf Hunter – 2017-08-03T15:10:28.257
Were any marked as the answer? Hint, mine was safe and had the lower byte count ;)
– None – 2018-07-08T12:38:46.777@YiminRong No answers were marked. I don't mark answers. – Post Rock Garf Hunter – 2018-07-08T14:09:10.813