OFFSET
0,4
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..6562 (Rows for n = 0..256)
EXAMPLE
Table begins:
0;
-1, 1;
-2, 2;
-3, -1, 1, 3;
-4, 4;
-5, -3, 3, 5;
-6, -2, 2, 6;
-7, -5, -3, -1, 1, 3, 5, 7;
-8, 8;
-9, -7, 7, 9;
-10, -6, 6, 10;
-11, -9, -7, -5, 5, 7, 9, 11;
-12, -4, 4, 12;
-13, -11, -5, -3, 3, 5, 11, 13;
...
PROG
(PARI) row(n) = my (r=[0], b=Vecrev(binary(n))); for (k=0, #b-1, if (b[k+1], r=concat(apply(v -> [v-2^k, v+2^k], r)))); Set(r)
CROSSREFS
KEYWORD
sign,base,tabf
AUTHOR
Rémy Sigrist, Oct 26 2019
STATUS
approved