Consider a completely multiplicative function ($f(mn)=f(m)f(n)$ for positive integer $m$ and $n$) with a range of $\{-1, 1\}$. The prefix sum of it is $S(x)=\sum_{i=1}^x f(i)$.
Let $k$ be a given positive integer. If $|S(x)| \le k$ holds for every integer $1 \le x \le n$, what is the maximum of $n$? (Notice that the function can be chosen by us, as long as these conditions hold. Henceforth I will use $F(k)$ to notate the maximum of $n$.)
By enumerating every possibility with a computer program, I can find that for $k=1,2$, the maximums of $n$ are $9$ and $246$, respectively. (By the way, OEIS yields no result on this sequence.) For the former the function starts like this: $1, -1, -1, 1, -1, 1, 1, -1, 1, \dots$.
By constructing the function $$f(x)=\begin{cases}f(\frac x3)&x\bmod3=0,\\1&x\bmod3=1,\\-1&x\bmod3=2,\end{cases}$$ I can prove that $f(k)=\Omega(3^k)$, where $\Omega$ is the Big-Omega notation, representing the asymptotic lower bounds. An idea to improve it may be adjusting the value of the function at a prime close to some power of $3$ chosen arbitrarily. (Of course, we must also change of the values of the function at the multiples of the prime, to satisfy the conditions.) This may reduce the absolute value of the prefix sum, since it is larger near power of $3$.
That's all I've known. Actually it might turn out that there exists a $k$ so that $n$ can be as large as we like, but I can't neither prove or disprove this.
I think the problem might be researched before, but I couldn't find any information on the Internet about this. Therefore, any information or idea about it is appreciated.