OFFSET
1,1
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..1000
EXAMPLE
33 is neither a Fibonacci number nor can be written as the sum of two or three Fibonacci numbers.
MAPLE
isA111458 := proc(n) # returns true if n is in the sequence
local xi, yi, x, y, z ;
for xi from 0 do
x := A000045(xi) ;
if 3*x > n then
return true;
end if;
for yi from xi do
y := A000045(yi) ;
if x+2*y > n then
break;
else
z := n-x-y ;
if isA000045(z) then # see isFib in A000045
return false;
end if;
end if;
end do:
end do:
end proc:
A111458 := proc(n)
option remember;
local a;
if n = 0 then
-1;
else
for a from procname(n-1)+1 do
if isA111458(a) then
return a;
end if;
end do:
end if;
end proc: # R. J. Mathar, Sep 09 2015
MATHEMATICA
FibQ[n_] := IntegerQ[Sqrt[5n^2+4]] || IntegerQ[Sqrt[5n^2-4]];
P[n_] := IntegerPartitions[n, 3, Select[Range[n], FibQ]];
Select[Range[1000], P[#] == {}&] (* Jean-François Alcover, Jul 20 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefan Steinerberger, Nov 15 2005
STATUS
approved