First you need to identify if the sequence is regular or irregular. The former can be distilled into a function for generating successive numbers. The latter cannot so will require some sort of lookup table. In your given example, the sequence is irregular since you only specify one missing entry. For it to be regular there would have to be multiple missing entries and an identified function.