{"raw_statement":[{"iden":"statement","content":"The complete problemset is available on http://maratona.ime.usp.br/primfase19/provas/competicao/maratona_en.pdf\n\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of lanterns.  \nLet $ X = (x_1, x_2, \\dots, x_n) $ be a strictly increasing sequence of lantern coordinates, where $ 0 \\le x_1 < x_2 < \\dots < x_n \\le 10^{18} $.\n\n**Constraints**  \n$ 3 \\le n \\le 3000 $\n\n**Objective**  \nFind the maximum size $ k $ of a subsequence $ (x_{i_1}, x_{i_2}, \\dots, x_{i_k}) $ with $ i_1 < i_2 < \\dots < i_k $ such that:  \n$$\nx_{i_2} - x_{i_1} = x_{i_3} - x_{i_2} = \\dots = x_{i_k} - x_{i_{k-1}}\n$$  \n(i.e., the selected lanterns form an arithmetic progression).  \nIf $ k < 3 $, any selection is valid — but we seek the *maximum* such $ k $.","simple_statement":"Find the maximum number of lanterns that can be turned on so that their positions form an arithmetic sequence.","has_page_source":false}