Cooking A Sequence!
CodeChefOpen on judge ↗
**Problem Statement:** Chef has recently been studying the Fibonacci sequence. Making a few changes to the original sequence, he made a sequence for Chefina named Chef's Sequence. The sequence is defined as follows- ```F(n)= 3*F(n-1) + 2*F(n-3) + 1``` The first three terms of the sequence are defined as F(1)=0, F(2)=1, F(3)=1. Chef want's to know the `N(th)` term of the sequence however he ha
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