tr(v)=if (v>=0, 1+2*v, -2*v)

big = 1 000 000
s = 0
S = []
unseen = 0
seen(v) = v = tr(v); if (v < big, bittest(s, v), setsearch(S, v))
see(v) = v = tr(v); if (v < big, s = bitor(s, 2^v), S = setunion(S, [v])); while (seen(unseen) && seen(-unseen), unseen++)

{
	see(0);
	see(1);

	for (n=1, #a = vector(10 000),
		for (w=unseen, oo,
			for (z=0, 1,
				v = w * (-1)^z;
				a[n] = v;

				ok = 1;	\\ so far
				for (e=0, valuation(n,2),
					if (seen(prod(k=n-2^e+1, n, a[k])),
						ok = 0;
						break;
					);
				);

				if (ok,
					for (e=0, valuation(n, 2),
						see(prod(k=n-2^e+1, n, a[k]));
					);
					print (n " " a[n]);
					break (2);
				);
			);
		);
	);
}

quit