Disclaimer: This is heavily inspired by "Polyglot the OEIS!" but fixes the problem that lead to closure (see the output section) and was re-posted as to not invalidate answers.
Introduction
We all know and love the on-line encyclopedia of integer sequences (OEIS). So what if we made an off-line version of the interesting sequences? Well, that would be kinda too easy, wouldn't it and how would you select a sequence with our standard interface!? No. We need an easier solution to this. A polyglot!
Input
Your input will be a non-negative integer n
.
Output
Your output will either be
- The
n
-th entry of an OEIS sequence OR - The first
n
entries of an OEIS sequence.
You may take the index to be 1-based or 0-based as you prefer.
To not make this question a duplicate of The versatile integer printer constant sequences are banned. This should also increase the difficulty level of submissions and avoid "boring" solutions ;)
A sequence is non-constant if there exist two sequence members that are unequal.
Uhm, so where is the Challenge?
You have to polyglot the above functionality. That is if you support languages A, B and C all must implement different OEIS sequences. The choice of sequence is not limited except that you need different ones for all languages.
That is, if you run the provided program in language A, then sequence X shall be generated, if you run the provided program in language B, then sequence Y shall be generated (with X!=Y) and if you run the provided program in language C, then sequence Z shall be generated (with X!=Z && Y!=Z).
Who wins?
The answer with the most sequence/language pairs wins. First tie-breaker is code-size (in bytes) with lower being better. Second tie-breaker is submission time with earlier being better.
Any final Words / Rules?
- You must declare which language will generate which sequence.
- Standard I/O rules apply.
- If different encodings are used between languages, both programs must use the same byte-sequence.
- Language (Python 2/3) revisions do count as different languages. Different implementations of a language (such as Browser JS vs Node.js) also count as different languages.
- Standard loopholes apply.