From 274a6404d3bc10160505461ee87234c086ed05a8 Mon Sep 17 00:00:00 2001 From: Egor Kostan <20955183+ikostan@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:57:57 -0800 Subject: [PATCH] Update sequence.py --- kyu_6/no_arithmetic_progressions/sequence.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kyu_6/no_arithmetic_progressions/sequence.py b/kyu_6/no_arithmetic_progressions/sequence.py index 5dda94e3d16..b0cbf3a64ce 100644 --- a/kyu_6/no_arithmetic_progressions/sequence.py +++ b/kyu_6/no_arithmetic_progressions/sequence.py @@ -16,16 +16,11 @@ def sequence(n: int) -> int: form an arithmetic progression. Example: - f(0) = 0 -- smallest non-negative - f(1) = 1 -- smallest non-negative, which is not yet in the sequence - f(2) = 3 -- since 0, 1, 2 form an arithmetic progression - f(3) = 4 -- neither of 0, 1, 4, 0, 3, 4, 1, 3, 4 form an arithmetic progression, so we can take smallest non-negative, which is larger than 3 - f(4) = 9 -- 5, 6, 7, 8 are not good, since 1, 3, 5, 0, 3, 6, 1, 4, 7, 0, 4, 8 are all valid arithmetic progressions.