Odd Divisor Sequence
CodeChefOpen on judge ↗
The sequence $1$, $1$, $1$, $3$, $5$, $9$, $17$, $31$, $57$, $105$, $193$, $355$, $653$, $1201$, $…$ 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. Given $n$, your task is to find the $n^{th}$ odd number that does not divide any t
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start