Let and let equal for . Define to be 1 if and -1 if . What is the largest such that ?
Problem 1269
Official solution
Suppose that for some . Then because . The following table lists the values of and for a few : & & & & 0 \$N+1N+1 & 1 & \$N+3N & 1 & \$N+5N-1 & 1 & \$N+7N-2. We see inductively that, for every i 1S_{N+2 i}=2 N+2+iS_{N+1+2 i}=N+1-iS_{3 N+3}=0kS_{k}=0kS_{k}=0 satisfy the recurrence relation p_{n+1}=3 p_{n}+3, and we compute that the first terms of the sequence are 0,3,12,39,120,363,1092$; hence 1092 is our answer.