OFFSET
1,2
COMMENTS
The next term has 345 digits and is not displayed here.
EXAMPLE
a(5)=Fibonacci(5+3)=34 because a(4) is the 5th Fibonacci number and a(3)=3.
MAPLE
f := proc(n)
combinat[fibonacci](n+1) ;
end proc:
Fidx := proc(n)
for i from 1 do
if f(i) = n then
return i;
elif f(i) > n then
return -1 ;
end if;
end do:
end proc:
A112866 := proc(n)
option remember;
if n<= 2 then
n;
else
i := Fidx(procname(n-1)) ;
f( i+procname(n-2)) ;
end if:
end proc: # R. J. Mathar, Nov 26 2011
MATHEMATICA
f[n_] := Fibonacci[n+1];
Fidx[n_] := For[i = 1, True, i++, If[f[i] == n, Return[i], If[f[i] > n, Return[-1]]]];
a[n_] := a[n] = If[n <= 2, n, i = Fidx[a[n-1]]; f[i+a[n-2]]];
Table[a[n], {n, 1, 7}] (* Jean-François Alcover, Oct 26 2023, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Yasutoshi Kohmoto, Dec 25 2005
STATUS
approved