OFFSET
0,4
REFERENCES
R. Bacher and R. Chapman, Symmetric Pascal matrices modulo p, European J. Combin. 25 (2004), no. 4, 459-473.
FORMULA
a(0)=0 and a(2^l-k)=(2^l+2*(-1)^l)/3-k+2*a(k) for 0<=k<=2^(l-1).
MAPLE
f := (l, n)->if 2^l<(n) then f(l+1, n); else l fi; fo := n->f(0, n); a := n->if n=0 then 0 else (2^fo(n)+2*(-1)^fo(n))/3-(2^fo(n)-n)+2*a(2^fo(n)-n); fi;
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Roland Bacher, Jun 18 2003
STATUS
approved