# Different upper and lower bound

If $N(a,b)$ is the maximum length of a $\pm 1$ sequence with the partial sums along its HAPs bounded below by $-a$ and above by $b$, then:

$N(a, b) = N(b, a)$

$N(0, b) = b$ (everything must be $+1$)

$N(1, 1) = 11$ (there are $4$ such sequences: choose $x_1$, and use the constraints $x_n +x_{2n} = 0$ and $x_1 + \ldots + x_{2n} = 0$ to determine the entries up to $10$; then choose $x_{11}$) (alternatively: Our first placement can be arbitrary, so suppose 6 is +. This forces 12-, which forces 3- and 9+, which forces 2- and 4+, which forces 1+ and 8-, which forces 5- and 10+, which forces 7+, and a contradiction when d = 1 and k = 10. The sequence is thus: + – - + – + + – + + . -)

$N(1, 2) = 41$ (there are $4$ such sequences -- example below)

$N(1, 3) = 83$ (there are $216$ such sequences -- example below)

$N(1, 4) = 131$ (there are $87144$ such sequences -- example below)

$N(1,b)\lt\infty$ (On a conjecture of Erdős and Čudakov)

 Question: is $N(1,b)$ always prime?


$N(2, 2) = 1160$ (e.g the first 1124-sequence)

For the zero-based problem, see this comment

## Method

Here should be a short description of the way the sequences was found. (The code(s) used should be further down this page.)

## Status

Is the data still relevant (e.g. longest know)? Is the method still relevant, or have we found a better method? Is the program still running on a computer somewhere?

## The data

$N(1, 2) = 41$ (there are $4$ such sequences -- example below)

0 + - - + - + + - + + - - +
- + + - + - - - + - + + - -
+ + - + - + + - - - + - + +


$N(1, 3) = 83$ (there are $216$ such sequences -- example below)

0 - + - + - + + - + + - - +
- + + - - + - - + - + + - +
+ + - - - + + - + + - - + -
+ - - + + - - + - + + + - +
- - - + + - + - + - - + - +
+ - + + - - + - + - - - + +


$N(1, 4) = 131$ (there are $87144$ such sequences -- example below)

0 + - - + - + + - - + -
+ + - + + + + - - - + -
- + - + + - - + + + - -
- + + - + - + - - + + -
+ + - - + - - + - + + +
+ - - + - + - - + + + -
+ - - - - + + - - - + +
- - + + + + - - - - + +
- + - + + + + - - + + -
+ - - - + + - - - + - -
+ + + - + + - - + - - +


$N(2, 2) = 1160$

--Alec 13:46, 9 January 2010 (UTC)

## Relevant code

The code(s) (or a link to the code(s)) used to find this sequence should be posted here.