11
2
This is an answer-chaining challenge relating to the OEIS.
Oh, the justification for this is because a company needs one program to print out their OEIS sequences real bad and they have every language.
The answer-chaining format works in the following way:
Someone posts the first answer, from which all further solutions stem. This answer is a program that, given a number N, inputs the Nth number in OEIS sequence of whatever index they choose (we'll call it sequence 1), in whatever language they choose (language 1)
Someone else comes along and chooses their own sequence (that has to be different from the previous, and from all previous sequences). They make a program, in another language (which has to be different from all previous languages), that given a number N in the language 1 outputs the Nth number of sequence 1 and, given a number in language 2 outputs the Nth number of sequence 2.
This process continues ad infinitum.
The nth term of a sequence is the term that comes n times after the first, working from the first item. Here we use 0 and 1-indexing, to be easy on the coders!
No language or sequence reusing.
Input must be an integer or a string representation of an integer and output must be the correct value of the sequence. Error handling (non-int input) is not needed.
You must not post twice in a row.
You must wait an hour or more before posting again.
Whoever is the SECOND-to-last to post after a week of no answers (the person who didn't break the chain) wins, though the contest can continue indefinitely. If you're last and can show that you can add one more language to it, you continue the challenge until the next winner.
You can assume that the input or the output won't be outside the numerical range of your language (for example, assuming that IEEE's limit won't be surpassed by any sequence) but don't be a trickster and abuse this by using a language that only has 1.
Any sequence can be chosen, as long as it hasn't been used before.
The input cannot be out-of-bounds for the sequence you are using.
Two different language versions are different languages (Python 2 and Python 3 are considered different langs of their own). This isn't rigid, but as a rule of thumb, if it's separated from another version of the same language on TIO, it's different.
This isn't banned, but try once not to use the formula the OEIS gives.
If your resulting code is over 65536 characters long, provide a link to access it (e. g. Pastebin).
That's it and that's all. Ready? Set? FUN!
Yes, this IS "One OEIS after another" but put on multiplayer. I thought it'd be cool.
1
I greatly enjoyed One OEIS after another but I'm not very good at polyglots, so I'll probably watch this one from the sidelines.
– Giuseppe – 2019-06-10T14:49:34.570Oh boy this sounds familiar :sweating: – HyperNeutrino – 2019-06-10T14:51:12.537
Yeah. Thought it'd be cool and I haven't seen it. – Andrew – 2019-06-10T14:52:54.723
@HyperNeutrino "ah shoot, here we go again"
– Giuseppe – 2019-06-10T14:53:31.343caird coinheringaahing: Look at my OEIS polyglot.
Everyone after looking at my post: Ah shoot, here we go again. – Andrew – 2019-06-10T14:55:19.737
@Giuseppe yeah that's what i was thinking immediately LOL – HyperNeutrino – 2019-06-10T14:56:01.540
Come on, guys, at least try to not use something that is all ones, or threes, or twos. – Andrew – 2019-06-12T14:52:15.403
Sequences of single digits are valid OEIS sequences. They may be boring, but they are sequences. However, I've been doing my best to do math-y sequences, I just had to give up with whitespace because I couldn't figure out where the input value was going. If you didn't want boring sequences, you should have banned boring sequences. ;P – Draco18s no longer trusts SE – 2019-06-12T16:09:24.180
Not even against them, just saying. Besides, how do you ban boring sequences without shutting down your challenge because of an unobjective rule? – Andrew – 2019-06-12T16:24:51.960
Oh sure, hence the ;P – Draco18s no longer trusts SE – 2019-06-12T17:18:54.243
Let us continue this discussion in chat.
– Draco18s no longer trusts SE – 2019-06-12T22:03:05.9731Some submissions use 0-indexing and others use 1-indexing (see the comments under submission #10). I suggest you allow both. – Robin Ryder – 2019-06-13T16:07:19.623
@Andrew Uh,
SECOND-to-last
? If I posted #17 too late ("after a week of no answers"), that makes #15 the accepted answer, not #16. – Draco18s no longer trusts SE – 2019-07-05T17:15:16.910