# Algorithm for finding multiplicative sequences with bounded discrepancy

This is an algorithm for finding long multiplicative sequences over a finite set of complex numbers (eg. {-1,1}), or showing that they don't exist. The algorithm consists of 3 types of operations: Using multiplicativity, using bounded discrepancy, and guessing.

• Using multiplicity is:
• Setting $x_1=1$.
• Determining one of $x_a,x_b,x_{ab}$ from the two others using $x_ax_b=x_{ab}$.
• Determining one of $x_a, x_{an^2}$ from the other using $x_a=x_{an^2}$.
• Using bounded discrepancy is:
• For any positive integer n, write down all numbers between -C and C with the same parity as n. This is the "possible partial sums at n". If there is only one possible partial sum at n, call it "the partial sum at n".
• Set 0 to be the partial sum at 0.
• If we know the partial sum at n-1 and $x_n$, you may set the partial sum at n to be the sum of these two.
• If we know the partial sum at n and $x_n$, you may set the partial sum at n-1 to be the sum at n minus $x_n$.
• If neither c-1 or c+1 is a possible partial sum at n, you may delete c as a partial sum at n-1 and n+1.
• If you know the partial sum at n and at n-1, you may set $x_n$ to be the sum at n minus the sum at n-1.
• Guessing is:
• If you can assign a value to $x_n$ and reach a contradiction (that is one of the formulas in "using multiplicity" is not fulfilled or for some n there is no possible sum at n) using multiplicity, bounded discrepancy, and guessing you may conclude that this is not a possible value for $x_n$.
• If there is only one possible value for $x_n$, you may assign this value to $x_n$.