статьи Я.М. Барздиня "Complexity of programs which recognize whether natural numbers not exceeding n belong to a recursively enumerable set".