|
| |
|
|
A050601
|
|
Recursion counts for summation table A003056 with formula a(0,x) = x, a(y,0) = y, a(y,x) = a((y XOR x),2*(y AND x))
|
|
2
| |
|
|
0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 2, 1, 2, 0, 0, 1, 2, 2, 1, 0, 0, 2, 1, 1, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 3, 2, 3, 1, 3, 2, 3, 0, 0, 1, 3, 3, 2, 2, 3, 3, 1, 0, 0, 2, 1, 3, 2, 1, 2, 3, 1, 2, 0, 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 0, 0, 3, 2, 3, 1, 3, 1, 3, 1, 3, 2, 3, 0, 0, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 0, 0, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 0
(list; table; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,12
|
|
|
FORMULA
| a(n) -> add2c( (n-((trinv(n)*(trinv(n)-1))/2)), (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n) )
|
|
|
MAPLE
| add2c := proc(a, b) option remember; if((0 = a) or (0 = b)) then RETURN(0); else RETURN(1+add_c(XORnos(a, b), 2*ANDnos(a, b))); fi; end;
|
|
|
CROSSREFS
| Cf. A050600, A050602, A003056, A048720 (for the Maple implementation of trinv and XORnos, ANDnos)
Sequence in context: A101664 A091952 A108803 * A101650 A053796 A029391
Adjacent sequences: A050598 A050599 A050600 * A050602 A050603 A050604
|
|
|
KEYWORD
| nonn,tabl
|
|
|
AUTHOR
| Antti Karttunen Jun 22 1999
|
| |
|
|