Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A003987
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A003987 Table of n XOR m (or Nim-sum of n and m) read by antidiagonals, i.e. with entries in the order (n,m) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),... +0
42
0, 1, 1, 2, 0, 2, 3, 3, 3, 3, 4, 2, 0, 2, 4, 5, 5, 1, 1, 5, 5, 6, 4, 6, 0, 6, 4, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 6, 4, 6, 0, 6, 4, 6, 8, 9, 9, 5, 5, 1, 1, 5, 5, 9, 9, 10, 8, 10, 4, 2, 0, 2, 4, 10, 8, 10, 11, 11, 11, 11, 3, 3, 3, 3, 11, 11, 11, 11, 12, 10, 8, 10, 12, 2, 0, 2, 12, 10, 8, 10, 12, 13, 13, 9, 9 (list; table; graph; listen)
OFFSET

0,4

COMMENT

T[2i,2j] = 2T[i,j], T[2i+1,2j] = 2T[i,j] + 1.

REFERENCES

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.

J. H. Conway, On Numbers and Games. Academic Press, NY, 1976, pp. 51-53.

R. K. Guy, Impartial games, pp. 35-55 of Combinatorial Games, ed. R. K. Guy, Proc. Sympos. Appl. Math., 43, Amer. Math. Soc., 1991.

LINKS

T. D. Noe, Rows n=0..100 of triangle, flattened

J.-P. Allouche and J. Shallit, The Ring of k-regular Sequences, II

N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).

Index entries for sequences related to Nim-sums

EXAMPLE

Table begins

0 1 2 3 4 5 6 ...

1 0 3 2 5 4 7 ...

2 3 0 1 6 7 4 ...

3 2 1 0 7 6 5 ...

MAPLE

nimsum := proc(a, b) local t1, t2, t3, t4, l; t1 := convert(a+2^20, base, 2); t2 := convert(b+2^20, base, 2); t3 := evalm(t1+t2); map(x->x mod 2, t3); t4 := convert(evalm(%), list); l := convert(t4, base, 2, 10); sum(l[k]*10^(k-1), k=1..nops(l)); end; # memo: adjust 2^20 to be much bigger than a and b

AT := array(0..N, 0..N); for a from 0 to N do for b from a to N do AT[a, b] := nimsum(a, b); AT[b, a] := AT[a, b]; od: od:

MATHEMATICA

Flatten[Table[BitXor[b, a - b], {a, 0, 10}, {b, 0, a}]] (BitXor and Nim Sum are equivalent)

CROSSREFS

Initial rows are A001477, A004442, A004443, A004444, etc. Cf. A051775, A051776.

Cf. A003986 (OR) and A004198 (AND).

Antidiagonal sums are in A006582.

Adjacent sequences: A003984 A003985 A003986 this_sequence A003988 A003989 A003990

Sequence in context: A074660 A002125 A135356 this_sequence A063180 A028376 A059235

KEYWORD

tabl,nonn,nice

AUTHOR

Marc LeBrun (mlb(AT)well.com)

page 1

Search completed in 0.003 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified May 12 19:26 EDT 2008. Contains 139661 sequences.


AT&T Labs Research