OEIS Identification
Challenge
Identify as many different OEIS sequences as possible in as few bytes as possible. You can output multiple sequences for one input, and your input is at most 10 values long and at least one. You must not mislabel an input, i.e. 2, 3, 4, 5
cannot be identified as A000040.
A subset of a sequence, i.e. being given 39, 197, 601, 1451, 1907
(all primes, but some are missing) can not be identified as the full sequence (in this case, it's not A000040. No OEIS sequence matches this input). Sequence match must be exact, the input must match the first [input length] terms of a sequence. Sequences with an element larger than $2^{32}-1$ within the first 10 elements, no elements, or fewer than 10 elements are not permitted.
You are obviously not required to output correctly for every single OEIS sequence.
No networking or similar is allowed, you cannot download the OEIS database.
You are not required to handle numbers larger than a 32-bit integer can store, and gain no points for doing so. Make sure float imprecision doesn't result in a mislabeled input.
Scoring
TBD. I'm thinking $b \div m$, where b is byte count and m is the number of matched sequences.
If a sequence is impossible to identify within the rules, it does not count toward the score. There must be some input that gives that sequence as an output.
Input
List of numbers, answer can either be a full program or a function.
Output
Integers describing which sequences were detected, optionally with the A prefix. 40
, 000040
, and A000040
are all valid ways to identify a sequence.
Advice
Start with simple sequences, like A000012 (1, 1, 1, ...
) and A000040 (the primes)
Here's a few worth checking out:
- A000012 All ones sequence
- A000040 Primes
- A000027 All positive integers (not zero)
- A000079 Powers of Two
- A000045 Fibonacci Sequence This is an optimization challenge, you'll want to be picky about what sequences you take, and it'll often be advantageous to take related sequences.
1 comment thread