OFFSET
0,3
COMMENTS
There are 2^{2n} choices for (u,v).
A carry propagation is started if u_i = v_i = 1, and is extended if one bit of either u or v is 0 and the other is 1.
The longest carry propagation is n, for instance if u = 111...11, v = 000...01. See A050602 for further examples.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..250
Nicholas Pippenger, Analysis of carry propagation in addition: an elementary approach, J. Algorithms 42 (2002), 317-333.
FORMULA
Pippenger's formula is given in the Maple code.
MAPLE
C:=proc(n) local t0, j, k;
t0:=0;
for k from 1 to n+1 do
for j from 1 to floor(n/k) do
if (j*(k-1) <= n) and (j <= n-j*(k-1)) then
t0:=t0+binomial(n-j*(k-1), j)*(-1)^(j+1)/2^((k+1)*j);
fi;
od;
od:
RETURN(4^n*t0);
end;
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 21 2011
STATUS
approved