Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2020 — Math Olympiad Vault — Part 05 Question 45

Math Olympiad Vault · MathNet 2020 — Math Olympiad Vault — Part 05

Question 45

Starting with a positive integer $n$, form a sequence by repeatedly subtracting from the previous term the largest perfect square not exceeding it, until zero is reached. For example, $n=142$ gives this five-term sequence:
$$
a_{1}=142, a_{2}=21, a_{3}=5, a_{4}=1, a_{5}=0
$$
since $21=142-11^2$, $5=21-4^2$, $1=5-2^2$, and $0=1-1^2$.

a) Give an example of a sequence with exactly 6 terms.

b) Find the smallest $n$ yielding exactly 7 terms.