The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A004198 Table of x AND y, where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),... 85
 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 4, 1, 2, 1, 0, 0, 0, 2, 2, 4, 4, 2, 2, 0, 0, 0, 1, 0, 3, 4, 5, 4, 3, 0, 1, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 1, 2, 1, 0, 5, 6, 5, 0, 1, 2, 1, 0, 0, 0, 2, 2, 0, 0, 6, 6, 0, 0, 2, 2, 0, 0, 0, 1, 0 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 0,13 COMMENTS Or, table of AND(i,j), i >= 0, j >= 0, read by antidiagonals. - N. J. A. Sloane, Feb 08 2016 Or, table of (i+j-Nimsum(i,j))/2) read by antidiagonals [Winning Ways, p. 75]. - N. J. A. Sloane, Feb 22 2019 REFERENCES E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 75. LINKS T. D. Noe, Rows n=0..100 of triangle, flattened EXAMPLE The AND(i,j) table (shown without commas or spaces) begins: 0000000000000000000000000... 0101010101010101010101010... 0022002200220022002200220... 0123012301230123012301230... 0000444400004444000044440... 0101454501014545010145450... 0022446600224466002244660... 0123456701234567012345670... 0000000088888888000000008... 0101010189898989010101018... ... The first few antidiagonals are: 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 4, 1, 2, 1, 0, 0, 0, 2, 2, 4, 4, 2, 2, 0, 0, 0, 1, 0, 3, 4, 5, 4, 3, 0, 1, 0, ... - N. J. A. Sloane, Feb 08 2016 MAPLE # Maple code for first M rows and columns of AND(i, j) table M:=24; f1:=n->[seq(ANDnos(i, n), i=0..M-1)]; for n from 0 to M-1 do lprint(f1(n)); od: # N. J. A. Sloane, Feb 08 2016 MATHEMATICA Table[BitAnd[k, n - k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, Apr 01 2017 *) PROG (PARI) tabl(nn) = {for(n=0, nn, for(k=0, n, print1(bitand(k, n - k), ", "); ); print(); ); }; tabl(20) \\ Indranil Ghosh, Apr 01 2017 (Python) for n in range(21):     print([k&(n - k) for k in range(n + 1)]) # Indranil Ghosh, Apr 01 2017 (C) #include int main() { int n, k; for (n=0; n<=20; n++){     for(k=0; k<=n; k++){         printf("%d, ", (k&(n - k)));     }     printf("\n"); } return 0; } /* Indranil Ghosh, Apr 01 2017 */ CROSSREFS Cf. A003986 (OR) and A003987 (XOR). Cf. also A075173, A075175, A221146. Sequence in context: A092606 A275948 A073253 * A324351 A116402 A093323 Adjacent sequences:  A004195 A004196 A004197 * A004199 A004200 A004201 KEYWORD tabl,nonn,look AUTHOR STATUS approved

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

Last modified December 7 13:08 EST 2021. Contains 349581 sequences. (Running on oeis4.)