Project Euler Lab - Problem 225

#225 - Tribonacci Non-divisors

● AppliedOfficial difficulty: 24%DivisibilityTier B - browser, with the efficient algorithmNot viewed
↖ Euler Lab

The sequence \(1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653, 1201, \dots\)
is defined by \(T_1 = T_2 = T_3 = 1\) and \(T_n = T_{n - 1} + T_{n - 2} + T_{n - 3}\).

It can be shown that \(27\) does not divide any terms of this sequence.
In fact, \(27\) is the first odd number with this property.

Find the \(124\)th odd number that does not divide any terms of the above sequence.

This problem is taken from Project Euler, Problem 225.
Problem text © Project Euler, licensed under CC BY-NC-SA 4.0. Original: projecteuler.net/problem=225. Published Friday, 26th December 2008, 05:00 pm. Solved by 5,069 members at time of mirroring.

Why this is useful

Algorithmic Development. Optimal substructure and state-space reasoning are exactly how American-option pricing and optimal execution are solved (Phases 13, 16).

We classify relevance honestly - not every Euler problem is a trading application.

Learning mode

Pick how much scaffolding you want. Your choice is remembered per problem.

Scratchpad

Mathematical notes, formulas, pseudocode, hypotheses, complexity notes. Saved automatically with your progress.

Python workbench

Tier B - browser, with the efficient algorithm
Runs in the browser only with the intended efficient algorithm; a naive loop will hit the timeout.

Real Python (Pyodide) in a sandboxed Web Worker - no network, no filesystem, no DOM access. Ctrl/Cmd+Enter runs. Escape leaves the editor. Stop terminates the worker.

Python runtime not loaded (it boots on first run - a one-time local load).

Check your answer

Answers are checked against a salted hash held in a separate file - not printed in this page. This prevents accidental spoilers; it is not cryptographic protection (see the build notes).

Progressive hints

Confidence

Low confidence schedules this problem for spaced review, even if you solved it.

Reference solution

Spoiler
The complete original explanation (interpretation, naive approach, insight, proof, complexity, Python implementation, tests, common mistakes, alternatives) is hidden and lazy-loaded. Reveal it only after a meaningful attempt - the struggle is where the learning happens.