OFFSET
0,3
LINKS
R. J. Mathar, Table of n, a(n) for n = 0..3071
A. Karttunen, On Pascal's Triangle Modulo 2 in Fibonacci Representation, The Fibonacci Quarterly, Vol. 42, #1 (2004) pp. 38-46.
EXAMPLE
F_1 = 1,
F_3 = 2,
F_1 + F_3 = 3,
F_5 = 5,
F_5 + F_1 = 6,
F_5 + F_3 = 7,
F_5 + F_3 + F_1 = 8,
F_7 = 13, ...
MAPLE
with(combinat); [seq(A062877(j), j=0..265)]; A062877 := n -> add((floor(n/(2^i)) mod 2)*fibonacci((2*i)+1), i=0..floor_log_2(n+1));
floor_log_2 := proc(n) local nn, i; nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi; nn := floor(nn/2); od; end;
# alternative
isA062877 := proc(n)
local fset, fidx, ps ;
if n = 0 then
return true;
end if;
fset := {} ;
for fidx from 1 by 2 do
if combinat[fibonacci](fidx) >n then
break;
end if;
fset := fset union {combinat[fibonacci](fidx)} ;
end do:
for ps in combinat[powerset](fset) do
if n = add(fidx, fidx=ps) then
return true;
end if;
end do:
return false;
end proc: # R. J. Mathar, Aug 22 2016
MATHEMATICA
Take[Union[Total/@Subsets[Fibonacci[Range[1, 20, 2]]]], 70](* Harvey P. Dale, Dec 21 2013 *)
PROG
(PARI) my(m=Mod('x, 'x^2-3*'x+1)); a(n) = subst(lift(subst(Pol(binary(n)), 'x, m)), 'x, 2); \\ Kevin Ryde, Nov 25 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 26 2001
STATUS
approved