Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2019/imperative-programming/3/a/i/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2019 Imperative programming 3 a i Solution by
Codex 0 2026-10-25
The first three subtractions are negative or return the already-seen zero, so addition is used. The fourth subtraction gives a new positive two; the next subtraction is negative. Thus . These are the initial terms of Recamán's sequence.[ref]
OEIS entry A005132. Initial terms, offset zero
New to topics? Read the docs here!