OFFSET
0,1
REFERENCES
Posting to math-fun mailing list Jan 10 1997.
MAPLE
Ki := proc(n, i)
option remember;
local phi ;
phi := (1+sqrt(5))/2 ;
if i= 0 then
n;
elif i=1 then
floor((n+1)*phi) ;
else
procname(n, i-1)+procname(n, i-2) ;
end if;
end proc:
Kisum := proc(n, m)
local ks, a, i;
ks := [seq( Ki(n, i)+Ki(m, i), i=0..5)] ;
for i from 0 to 2 do
for a from 0 do
if Ki(a, 0) = ks[i+1] and Ki(a, 1) = ks[i+2] then
return a;
end if;
if Ki(a, 0) > ks[i+1] then
break;
end if;
end do:
end do:
end proc:
A022416 := proc(n)
if n = 0 then
4;
else
Kisum(n-1, 4) ;
end if;
end proc:
seq(A022416(n), n=0..80) ; # R. J. Mathar, Sep 03 2016
MATHEMATICA
Ki[n_, i_] := Ki[n, i] = Which[i == 0, n, i == 1, Floor[(n+1)* GoldenRatio], True, Ki[n, i-1] + Ki[n, i-2]];
Kisum[n_, m_] := Module[{ks, a, i}, ks = Table[Ki[n, i] + Ki[m, i], {i, 0, 5}]; For[i = 0, i <= 2, i++, For[a = 0, True, a++, If[Ki[a, 0] == ks[[i+1]] && Ki[a, 1] == ks[[i+2]], Return[a]]; If[Ki[a, 0] > ks[[i+1]], Break[]]]]];
A022416[n_] := If[n == 0, 4, Kisum[n-1, 4]];
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved