Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Sandbox

OEIS Identification

+1
−1

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.
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

General comments (3 comments)