login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328732 Irregular table read by rows; for any n >= 0, the n-th row contains the numbers of the form u - v with u + v = n and u AND v = 0 (where AND denotes the bitwise AND operator), in ascending order. 1

%I #13 Oct 28 2019 02:43:48

%S 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,

%T -8,8,-9,-7,7,9,-10,-6,6,10,-11,-9,-7,-5,5,7,9,11,-12,-4,4,12,-13,-11,

%U -5,-3,3,5,11,13,-14,-10,-6,-2,2,6,10,14

%N Irregular table read by rows; for any n >= 0, the n-th row contains the numbers of the form u - v with u + v = n and u AND v = 0 (where AND denotes the bitwise AND operator), in ascending order.

%C The n-th row:

%C - has A001316(n) terms,

%C - has -n as first term and n as last term,

%C - has least positive term T(n, A001316(n)/2+1)) = A080079(n) (when n > 0).

%H Rémy Sigrist, <a href="/A328732/b328732.txt">Table of n, a(n) for n = 0..6562</a> (Rows for n = 0..256)

%H Rémy Sigrist, <a href="/A328732/a328732.png">Scatterplot of (n, T(n, k)) for n = 0..1024 and k = 1..A001316(n)</a>

%e Table begins:

%e 0;

%e -1, 1;

%e -2, 2;

%e -3, -1, 1, 3;

%e -4, 4;

%e -5, -3, 3, 5;

%e -6, -2, 2, 6;

%e -7, -5, -3, -1, 1, 3, 5, 7;

%e -8, 8;

%e -9, -7, 7, 9;

%e -10, -6, 6, 10;

%e -11, -9, -7, -5, 5, 7, 9, 11;

%e -12, -4, 4, 12;

%e -13, -11, -5, -3, 3, 5, 11, 13;

%e ...

%o (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)

%Y Cf. A001316, A080079.

%K sign,base,tabf

%O 0,4

%A _Rémy Sigrist_, Oct 26 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)