[Question]
  [
### Background
As noted in the PPCG challenge [Compress a maximal discrepancy-2 sequence](https://codegolf.stackexchange.com/q/122304/12012) – which inspired this challenge – the authors of the paper [Computer-Aided Proof of Erdős Discrepancy Properties](https://arxiv.org/pdf/1405.3097v2.pdf) found a maximal discrepancy-2 sequence, namely
```
-1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1,  1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1, -1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1,  1, -1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1,  1, -1,  1, -1,  1, -1, -1, -1, -1,  1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1,  1, -1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1,  1, -1, -1,  1, -1,  1, -1,  1, -1, -1,  1, -1,  1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1, -1,  1,  1,  1, -1, -1, -1,  1,  1,  1, -1,  1, -1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1,  1, -1, -1,  1, -1,  1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1,  1,  1, -1,  1, -1,  1, -1, -1,  1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1,  1, -1,  1,  1, -1,  1, -1,  1, -1,  1,  1, -1, -1, -1,  1, -1,  1, -1, -1,  1,  1,  1,  1, -1, -1,  1, -1, -1, -1,  1,  1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1,  1,  1, -1, -1,  1, -1, -1, -1,  1, -1,  1,  1,  1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1, -1, -1,  1,  1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1,  1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1,  1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1, -1,  1,  1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1, -1,  1,  1,  1,  1, -1, -1,  1, -1, -1,  1,  1,  1, -1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1,  1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1,  1, -1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1, -1, -1,  1,  1,  1, -1, -1, -1,  1,  1, -1,  1,  1, -1, -1, -1, -1,  1,  1,  1, -1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1, -1,  1,  1, -1, -1, -1, -1,  1,  1,  1, -1,  1,  1, -1, -1,  1,  1, -1, -1, -1, -1,  1,  1, -1,  1,  1,  1, -1, -1,  1,  1, -1, -1, -1,  1,  1,  1, -1, -1, -1, -1,  1, -1,  1, -1,  1,  1, -1,  1,  1, -1,  1,  1, -1,  1, -1,  1, -1, -1, -1, -1,  1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1,  1, -1, -1,  1, -1,  1, -1,  1, -1,  1,  1,  1,  1, -1, -1, -1,  1, -1,  1, -1,  1,  1, -1, -1,  1, -1, -1,  1, -1,  1, -1,  1, -1,  1,  1, -1,  1, -1,  1,  1,  1, -1, -1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1,  1,  1,  1, -1, -1,  1, -1,  1,  1,  1, -1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1, -1,  1,  1, -1, -1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1, -1,  1,  1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1,  1, -1,  1,  1,  1, -1, -1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1,  1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1,  1, -1,  1, -1, -1, -1, -1,  1,  1, -1, -1,  1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1, -1,  1, -1,  1,  1, -1,  1, -1, -1,  1,  1,  1, -1, -1, -1, -1,  1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, -1,  1, -1, -1,  1,  1,  1,  1, -1, -1, -1,  1,  1, -1, -1, -1,  1, -1,  1, -1,  1,  1, -1,  1, -1,  1,  1,  1, -1, -1,  1, -1,  1,  1, -1, -1,  1, -1,  1, -1, -1,  1, -1,  1, -1,  1,  1, -1, -1, -1,  1,  1,  1, -1,  1,  1
```
However, this is not the the only discrepancy-2 sequence of the length 1160; apart from the obvious variation of negating every term of the sequence, the are many valid variations that involve negating a pair of terms, and possibly entirely unrelated approaches that also lead to maximal sequences. The papers's authors made several design decisions that sped up their algorithm, but would a different set of decisions lead to a more compressible sequence? Let's find out!
### Definitions
Let \$k\$ and \$n\$ be positive integers. A finite sequence \$x\_1, \dots, x\_n\$ over \$\{-1, 1\}\$ is of discrepancy \$d\$ if
$$ \max\_{1\leq k\leq m\leq n} \left| \sum\_{1\leq jk\leq m} x\_{jk} \right| \leq d $$
In other words, the partial sums of the subsequences resulting of taking every \$k\$th term of \$x\$ all lie in the interval \$[-d, d]\$.
The sequence provided by the authors is of discrepancy **2**, as can be verified programmatically. For the first three values of \$k\$, we get the following subsequences and partial sums.
```
k = 1: -1,  1,  1, -1,  1, -1, -1,  1,  1, -1,  1,  1, -1,  1, -1, -1,  1, -1, ...
(sums) -1,  0,  1,  0,  1,  0, -1,  0,  1,  0,  1,  2,  1,  2,  1,  0,  1,  0, ...
k = 2:      1,     -1,     -1,      1,     -1,      1,      1,     -1,     -1, ...
(sums)      1,      0,     -1,      0,     -1,      0,      1,      0,     -1, ...
k = 3:          1,         -1,          1,          1,         -1,         -1, ...
(sums)          1,          0,          1,          2,          1,          0, ...
```
Later terms of the sequences of partial sums never reach **-3** or **3**.
In contrast, **1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1** is *not* a discrepancy-2 sequence.
```
k = 1:  1, -1, -1,  1,  1, -1, -1,  1,  1, -1, -1,  1
(sums)  1,  0, -1,  0,  1,  0, -1,  0,  1,  0, -1,  0
k = 2:     -1,      1,     -1,      1,     -1,      1
(sums)     -1,      0,     -1,      0,     -1,      0
k = 3:         -1,         -1,          1,          1
(sums)         -1,         -2,         -1,          0
k = 4:              1,              1,              1
(sums)              1,              2,              3
```
### Task
Write a full program or a function that takes no input, prints or returns a single discrepancy-2 sequence with 1160 terms, and abides to the following rules.
* You can use any kind of iterable (arrays, strings, etc.) that consists of exactly two different symbols: one representing **-1** and one representing **1**.
* Your output must be consistent, i.e., every time your code is run, it must output the same sequence.
* You must include the output of your program in your answer.
* Hardcoding your output sequence is allowed.
* To prevent trivial brute-force solutions, your code must finish in under a minute. For borderline-compliant solutions, I'll determine the official run time on my own machine (Intel Core i7-3770, 16 GiB RAM, openSUSE 13.2) or a sufficiently similar one if I cannot test your code on mine.
* Any built-in that is itself a valid submission to this challenge or a variation that takes the discrepancy as input (e.g., `FindMaximalDiscrepancySequence`) may not be in your answer. All other built-ins – including built-ins that calculate the discrepancy of a sequence – are allowed.
While finding a suitable sequence is a big part of the task, only your implementation contributes to your score. In other words, this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), and may the shortest code in bytes win!
### Validation
You can use [this Python script](https://tio.run/nexus/python3#dZDNbsIwEITP5ClGXGKrRMIcekCltz5BDz1UFTLpQiwFk3qd/qrPTteQQJCKkhy8nvkmO3umt5Z8SViA3m2tnG/aqLTOMreG30UwRdWLNO4W@CnMBOZ3no2a4HxU44cQdmGOWBF6Yc5wkbaMbcsRKwI5uQ4oDHYBZqyzEX26qMwxpyY/zIAxt9MTP3@ywTu/uUxAZRlr@hBorKw/WI6ZuTDXksKRmiW7b4LzCNZvSMmPX0TpFGJDdLZecruVDqbZKHkTKNl65fMZVsBgLs9p8iKQC8rN4uCXqaxmV6wGlxr3mCVDv9ygvE4Gkclq3QZIEfnkHDdBHsiWlcyG3IQ8VdqxH9uyJOZ/int1XAZqrC@/MMv1fi/NFN13fK@c/gA "Python 3 – TIO Nexus") to verify the output of your submission. It expects a string of comma-separated **-1**'s and **1**'s.
  
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 416 bytes
```
f(i){for(i=1160;i--;)putchar(L"\x72ca563b\xd24f18ad\xa70acd36\x59a6b345\xd669d0cb\x729b4962\xcd34ba65\x6359a2d2\x2e5c6936\x592ad729\xda652af1\xe69b4934\xc70adb50\xcc3b30dc\x96934dac\x69b1c6c3\x5b49369c\x3692ed26\xc9c6d329\xda4cf493\xa6716962\x6d349b43\xf26d349a\xa6934f22\xab14f235\xa569a4d5\xb4d26996\xd1a652e9\x9a6d2671\xa4e54bb4\x750e938d\xd369369a\x469b4d22\x69b0dacd\xb345a4f2\xb49a4d36i"[i/32]>>i%32&1?43:45);}
```
*-a ton of bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)!*
[Try it online!](https://tio.run/##JVHLTgMxDPyXSqDtoSKJHW9DRfkB/oDl4DgbyIGHKpAiIb69TNrLatYzHo8d272anc91atvf@nma2oP34g5ttztsv36@7U1P09Nm6XMwjUJ56SVw9XstS9fZqRWSpcekkokjWJFUnOXRkTInCUuHhrMKWCEoQ0EtrNEkXXuDFojRC03Q6pe@yuglRi9mlBwdkFEmV2zpCY1cFAgyb2IEl6GXhBq@YS0BzpZMCl2d2SoEyCyzl0sqUIwpqNVwwTpYONcAVrMHIGTG2km5AGWGbUpwLn5EXeGMxVGckVl5jZwzMs/RrYn2uBCOM1LBmcdGZTgDOIQHOy6mmDKcxwiStnludxRejsd2Q@HWPzLdc9we/s7v2j4mPNE0fv4B "C (gcc) – Try It Online")
# [C (gcc)](https://gcc.gnu.org/), 416 bytes
```
f(i){for(i=1160;i--;)putchar(L"\x72ca563b\xd24f18ad\xa70acd36\x59a6b345\xd669d0cb\x729b4962\xcd34ba65\x6359a2d2\x2e5c6936\x592ad729\xda652af1\xe69b4934\xc70adb50\xcc3b30dc\x96934dac\x69b1c6c3\x5b49369c\x3692ed26\xc9c6d329\xda4cf493\xa6716962\x6d349b43\xf26d349a\xa6934f22\xab14f235\xa569a4d5\xb4d26996\xd1a652e9\x9a6d2671\xa4e54bb4\x750e938d\xd369369a\x469b4d22\x69b0dacd\xb345a4f2\xb49a4d36i"[i/32]>>i%32&1?45:43);}
```
[Try it online!](https://tio.run/##JVHLTgMxDPyXSqDtoSKJHW9DRfkB/oDl4DgbyIGHKpAiIb69TNrLatYzHo8d272anc91atvf@nma2oP34g5ttztsv36@7U1P09Nm6XMwjUJ56SVw9XstS9fZqRWSpcekkokjWJFUnOXRkTInCUuHhrMKWCEoQ0EtrNEkXXuDFojRC03Q6pe@yuglRi9mlBwdkFEmV2zpCY1cFAgyb2IEl6GXhBq@YS0BzpZMCl2d2SoEyCyzl0sqUIwpqNVwwTpYONcAVrMHIGTG2km5AGWGbUpwLn5EXeGMxVGckVl5jZwzMs/RrYn2uBCOM1LBmcdGZTgDOIQHOy6mmDKcxwiStnludxRejsd2Q@HWP3K8Z9oe/s7v2j4mPNE0fv4B "C (gcc) – Try It Online")
# [C (gcc)](https://gcc.gnu.org/), 1148 bytes, non-competing
```
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#define DISCREPANCY 2
#define NTERMS 1160
#define NBITS(x) (sizeof(x) * CHAR_BIT)
static int terms[NTERMS];
/* non-branching abs */
static inline int abs_(int x)
{
    return (x ^ (x >> (NBITS(x) - 1))) - (x >> (NBITS(x) - 1));
}
/* generate and print terms */
int main(void)
{
    register int result = 0, iter, incr;
    for(iter = 0; iter < NTERMS; iter++)
        terms[iter] = 1;
    for(incr = NTERMS; incr > 0; incr--)
    {
        result = 0;
        for(iter = incr - 1; iter < NTERMS; iter += incr)
        {
            result += terms[iter];
            if(abs_(result) > DISCREPANCY)
            {
                /* undo change */
                /* result -= terms[iter]; */
                /* change term to fit requirements */
                terms[iter] = -terms[iter];
                /* do correct change */
                result += 2 * terms[iter];
            }
        }
    }
    for(iter = 0; iter < NTERMS; iter++)
    {
        if(iter == NTERMS-1)
            printf("%d\n", terms[iter]);
        else
            printf("%d, ", terms[iter]);
    }
}
```
This is my half-brute-force half-calculating solution but it breaks when you check every third term. I hope to improve it to the point where it generates a correct solution. Replace the `1` with `-1` on line 24 to negate the sequence. Please feel free to help me make this correct.
[Try it online!](https://tio.run/##lVPBbtswDL3rK4gWA@QkXusedkkXoMsKrIcFQ9LLsLWFK8uOAEfeJHkIVvjbU9L2LHt1ClQHWSIfH59IWoSZEIfDqdIiLxMJl7naKWffbxfM26xLlHYvbQWZ2GkiU6UlfL7ZLNfX365Wy@9w0VlXt9frrxuIog/nHrr6dHO74fsAuFV/ZZHScQLLL1frB/QEjFkXOyUAs4KTZmd/NDR3c8bOJqALHT6aWIut0hnEjxYmZz4kpwwUiY4HTod9wJ4Y4DLSlUYD38M9bYsF8E5KCFEQ0GfUMWdVnTqTWprYSYh1Ar9MJ5AU0GUXK83/FCrxKTNlEVIrMtKWuYOPcD4DhUbctTD4KEKmheFkJPe8dsNlW77mOp0GNZBWUxWy3iE@6lMgI5q6QLouakY8hWFD8dQReUktx39S6ngswagimDYAr8sT98gR1dM7H0BUyus@NdAApfbmKBhAh9y0sCGlTgoQ21hnknowgmhFhEMRR8AtEyHBFZAqatrvUhm5k9rZsahhK8KjL20zkNzCGCncK7J94S7wxzhKWbHhqXrjJPmKYhuaiH@TE0bD4teznvKTd8lPfTLrSwq8JplbeSRqBqNRFasOh2c "C (gcc) – Try It Online")
]