7 lines
80 B
Text
7 lines
80 B
Text
fib(n)=
|
|
{
|
|
my(g=2^(n+1)-1);
|
|
sum(i=2^(n-1),2^n-1,
|
|
bitor(i,i<<1)==g
|
|
);
|
|
}
|